- System stored procedure that returns object metadata
- Requires "public" role membership and at least one permission granted to the table
sp_help [<tablename>]
Example:
sp_help article
For tables, it returns:
- Table details - owner, date created
- Columns and their data types, nullability, collation, if they're computed columns
- Identity columns, seed and increment values
- RowGUIDCol information
- Filegroup where the data is located
- Index names and keys
- Constraint types, actions for delete and update, replication status
- Tables referencing by foreign key
- List of all views, user tables, constraints, synonyms, functions, queues, defaults, and system objects within the database
- List of user types within the database
No comments:
Post a Comment