Comments - Using a SHOW statement in a subquery

1 year, 1 month ago Ian Gilfillan

You could use the Information Schema Columns table, for example:

SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS 
  WHERE TABLE_SCHEMA='test' AND TABLE_NAME='y';
+-------------+
| COLUMN_NAME |
+-------------+
| a           |
| b           |
+-------------+
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.