2

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.

Monocito
  • 117
  • 1
  • 12
  • *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 Answers1

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