I'm trying to "describe" a table for a different post I have on StackOverflow, but when I run sp_columns, no results or rows are shown.
sp_columns assignee
Results:
A bunch of column headers...
What's wrong with my database, and why doesn't this work?
Instead of sp_columns
use catalog views (many of these sp_
procedures are not updated for new features).
SELECT name, system_type_id, ...
FROM sys.columns
WHERE [object_id] = OBJECT_ID('dbo.TableName');
---- yes this is important ----^^^^
Also, make sure you're in the right database, obviously.
For a specific schema, try:
sp_columns tableName, schemaName
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With