SELECT column_name, data_type,column_default, is_nullable, character_maximum_lenght, numeric_precision, datetime_precision
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name='MyTableName'
Detailed info on INFORMATION_SCHEMA: http://msdn.microsoft.com/en-us/library/ms186778.aspx
No comments:
Post a Comment