mssql-cli icon indicating copy to clipboard operation
mssql-cli copied to clipboard

\d not working on Azure Synapse Analytics DB

Open kruser opened this issue 4 years ago • 1 comments

I would like to use this against our Azure data warehouse, but sp_help doesn't exist there. Is there an alternative to show the table definition?

mydb> \d schema.tablename
Time: 2.521s (2 seconds)
Msg 104386, Level 16, State 1, Line 1
Stored procedure sp_help does not exist or is not supported.

kruser avatar Apr 09 '21 23:04 kruser

FYI, since sp_columns does exist, here's what I'm getting by with for now.

-- creating my own saved query
 \sn cols EXEC sp_columns @table_owner = '%$1%', @table_name = '%$2%'

--calling it like this
\n cols my-schema-name my-table-name

kruser avatar Apr 12 '21 20:04 kruser