Created
May 21, 2024 19:55
-
-
Save markheramis/2046e08dd10bb9c291b8c642ec10c1c7 to your computer and use it in GitHub Desktop.
Concat Table Columns into one column in the result.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
GROUP_CONCAT(`COLUMN_NAME` SEPARATOR ',') AS `columns` | |
FROM `INFORMATION_SCHEMA`.`COLUMNS` | |
WHERE | |
`TABLE_SCHEMA` = '<DATABASE>' AND | |
`TABLE_NAME` = '<TABLE>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment