Follow by Email

Monday, 22 June 2015

How to get datatype and length of column in sql server

This query will help:

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

0 comments:

Post a Comment


                                                            

 
Design by Abhinav Ranjan Sinha