Getting the column name and its datatype of SQL Server database table

SheoNarayan
Posted by SheoNarayan under Sql Server category on | Views : 11722
To get the name, data type and other details of the SQL Server database table, use following code.

exec sp_columns "MyTable"


This will list out all the table field name along with their data types and other details.

Comments or Responses

Posted by: Poster on: 4/3/2009 Level:Starter | Status: [Member]
To get the the list of columns and its data type in MySql, following sql statement can be used.

show columns from articles


Thanks

Login to post response