select *
from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='Table Name here'
//For Particular
select '['+COLUMN_NAME+']',DATA_TYPE,
case when CONVERT(varchar, CHARACTER_MAXIMUM_LENGTH)>0 then CHARACTER_MAXIMUM_LENGTH else '' end as mm,case when IS_NULLABLE='Yes' then 'NULL,' else 'NOT NULL,' end as tt
from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME=' Table Name here'
No comments:
Post a Comment