11 March 2013

Query to get column name with datatype and size


  1. SELECT column_name as 'Column Name', data_type as 'Data Type',
  2. character_maximum_length as 'Max Length'
  3. FROM information_schema.columns
  4. WHERE table_name = 'tblUsers'

1 comment:

  1. Yes shiva its working i got the output.
    thank you so much.

    ReplyDelete