Last active
January 24, 2017 21:19
-
-
Save tsundara/f259cc68a26e25f3ef505fafbd54b913 to your computer and use it in GitHub Desktop.
Oracle - Get Oracle column names separated by comma
This file contains hidden or 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
--Straighforward table_name and corresponding column names | |
SELECT table_name, LISTAGG(column_name, ',') WITHIN GROUP (ORDER BY column_name) as COLUMNS | |
FROM user_tab_cols | |
group by table_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment