Desc Query in Mssql Similar to Mysql
This query imitate the desc operation from mysql into mssql. It produces the columns and descriptions of the Products table from the Northwi...
https://www.czetsuyatech.com/2021/07/mssql-desc-query-like-in-mysql.html
This query imitate the desc operation from mysql into mssql. It produces the columns and descriptions of the Products table from the Northwind database.
SELECT
column_name, data_type, column_default, is_nullable
FROM information_schema.tables AS a
INNER JOIN information_schema.columns AS b
ON a.table_catalog = b.table_catalog
AND a.table_schema = b.table_schema
AND a.table_name = b.table_name
WHERE a.table_name = 'Products';
Post a Comment