Reputation: 717
I am trying to get data from columns containing a particular string in their name. I have found the answer for MySql MySQL: Select Column names containing a string but I need to do the same query for SQLite. Any suggest?
Upvotes: 0
Views: 1290
Reputation: 180020
Since SQLite 3.16, you can use PRAGMAs in queries:
SELECT name
FROM pragma_table_info('MyTable')
WHERE name LIKE ...
Upvotes: 1