I import data in excel from mysql and i want get the names of columns.
I do this final command for import the data and i just want have the headers of each columns and of the two tables of the join
SELECT * FROM direction_prix_proxi.matrice_sigma ref LEFT JOIN direction_prix_proxi.volumestest using(SIGMA)
I know the command
SHOW COLUMNS FROM
But i dont know if i can use it for that
Thanks !!
ps: i'm a beginner lol
If you want to select the headers of multiple tables (ie through a join), then you cannot use
SHOW COLUMNS FROM ...
Instead, try using:
SELECT column_name -- or use CONCAT_WS('.', table_name, column_name)
FROM information_schema.columns
WHERE table_name IN ('matrice_sigma', 'volumetest');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.