So basically I want a SQL Command that return every column in the table and the datatype that is in that column and whether is nullable.
Asked
Active
Viewed 658 times
2
-
*Which* implementation of SQL? Also, did you search at all before asking? I feel like this must have been asked already. – underscore_d Nov 13 '19 at 16:49
1 Answers
1
You can use information schema.
SELECT
COLUMN_NAME,
DATA_TYPE,
IS_NULLABLE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'yourTableName'

SQLChao
- 7,709
- 1
- 17
- 32