mysql - sql : select some column which I don't know the entire name -
i have table :
id exemple_abc tr_abc exemple_bcd tr_bcd ....
i want select of column origin "exemple_" seek :
select exemple_* mytable or select exemple_% mytable
but of doesn't work...
you cannot standard sql. column names not treated info in sql.
if utilize sql engine has, say, meta-data tables storing column names, types, etc. may select on table instead.
try one
select * information_schema.columns table_name='table1' , column_name 'exemple_%'
mysql
No comments:
Post a Comment