Created
April 28, 2023 11:03
-
-
Save viggin543/fcad64875f272dd2c2239b84e668c497 to your computer and use it in GitHub Desktop.
get table schema
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 c.COLUMN_NAME name, c.DATA_TYPE type | |
FROM INFORMATION_SCHEMA.COLUMNS c, | |
INFORMATION_SCHEMA.TABLES t | |
WHERE t.TABLE_NAME = c.TABLE_NAME | |
AND t.TABLE_SCHEMA = c.TABLE_SCHEMA | |
and c.TABLE_NAME = ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment