Below query will list all columns with their datatypes of a table in SQL Server.
select col.name as 'ColumName',typ.name as 'DataType' from sys.columns col left join sys.types typ
on col.system_type_id=typ.system_type_id where object_id=object_id('Your Table Name')
Replace "Your Table Name" with your table name.
It will show result like this.
| ColumName | DataType |
| col1 | int |
| col2 | varchar |
| col3 | varchar |
| col4 | int |
| col5 | bit |
| col6 | bit |

Join the conversation! Your thoughts help the community grow.