1 October 2013

Get field name, data type and size of database table in sql server


Query

SELECT column_name as 'Column Name', data_type as 'Data Type',
character_maximum_length as 'Length'
FROM information_schema.columns
WHERE table_name = 'tbl_employee'
Output

No comments:

Post a Comment