Select Individual Columns From Table Information Schema
The ‘desc’ command to get a list of table fields that is common in Oracle and MySql will fail in SQL Server. It turns out it is not sql-standard compliant. Instead, SQL Server uses the following command:
sp_columns myTableName
This will display detailed information about table structure.
If you need just individual columns, use the following command:
select column_name, data_type, character_maximum_length, *
from information_schema.columns
where table_name = ‘myTableName’
order by ordinal_position