On 7 Jun 2018, at 5:11pm, mukeshkb4u <mukeshk...@gmail.com> wrote: > I have a table with multiple similar column names, like > abc_1,abc_2,abc_3....... > > Is there a way i can do a select on only these columns in a table, without > specifiying the full column list? > Can i use a regular expression in selecting column names ?
No. You could use one PRAGMA call to find out the column names of that format, then use the result to build your query string. But there's no way to do it directly in a single statement. However, the use of numbered column names is often a sign that your schema needs rethinking. Rather than these being multiple columns in a row, could these not be separate rows in a table ? Then you could have a single SELECT, perhaps using group_concat(), retrieve just the values you want. Simon. _______________________________________________ sqlite-users mailing list email@example.com http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users