How to get column key constraints from the table : INFORMATION_SCHEMA in SQL?
I just need to get the columns which has Primary Key, Foreign Key along with these details.
SELECT COLUMN_NAME AS COLUMNNAME,
DATA_TYPE AS DATATYPE,
CHARACTER_MAXIMUM_LENGTH,
IS_NULLABLE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'My_Table_Name'