SQLite Forum

select * from t; -- but don't want virtual columns
Login
Actually, it would be:

```
  select group_concat(name, ', ') 
    from pragma_table_xinfo 
   where schema == :schema
     and arg == :tablename
     and hidden == 0
order by cid
;
```

Which will return you the comma separated list of non-hidden columns for the table :tablename in schema :schema.  Your application can then construct an SQL statement that works with columns that are not hidden.  Using the correct introspection pragma/virtual table is key.

Once you have that list of column names constructing an appropriate SQL statement in the application is trivial:

'insert into bcc (%s) select %s from cc' % (columns, columns)

will evaluate to the necessary SQL to insert the non-hidden columns from table cc into the same named columns in table bcc.

I do not think there would be any problem explaining that to anyone at all once you point out the correct method of getting the applicable column names.