dbcli / mssql-cli

A command-line client for SQL Server with auto-completion and syntax highlighting
BSD 3-Clause "New" or "Revised" License
1.35k stars 192 forks source link

\d not working on Azure Synapse Analytics DB #513

Open kruser opened 3 years ago

kruser commented 3 years ago

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 commented 3 years ago

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