Wednesday, 30 May 2012

Find Table Column name and Datatype

SELECT column_name 'Column Name',
data_type 'Data Type',
CHARacter_maximum_length 'Maximum Length'
FROM information_schema.columns
WHERE table_name = 'tbl_table'

No comments:

Post a Comment