SQL Server 2008 Books Online
Querying the SQL Server System Catalog FAQ
This topic contains a list of frequently asked questions. The answers to these questions are queries that are based on catalog views.
Frequently Asked Questions
The sections below list frequently asked questions by category.
Data Types
- How do I find the data types of the columns of a specified table?
- How do I find the LOB data types of a specified table?
- How do I find the columns that depend on a specified data type?
- How do I find the computed columns that depend on a specified CLR user-defined type or alias data type?
- How do I find the parameters that depend on a specified CLR user-defined type or alias type?
- How do I find the CHECK constraints that depend on a specified CLR user-defined type?
- How do I find the views, Transact-SQL functions, and Transact-SQL stored procedures that depend on a specified CLR user-defined type or alias type?
Tables, Indexes, Views, and Constraints
- How do I find all the user-defined tables in a specified database?
- How do I find all the tables that do not have a clustered index in a specified database?
- How do I find all the tables that do not have an index?
- How do I find all the tables that do not have a primary key?
- How do I find all the tables that have an identity column?
- How do I find all the tables and indexes that are partitioned?
- How do I find all views in a database?
- How do I find the definition of a view?
- How do I find all the entities that have been modified in the last N days?
- How do I find the columns of a primary key for a specified table?
- How do I find the columns of a foreign key for a specified table?
- How do I determine if a column is used in a computed column expression?
- How do I find all the columns that are used in a computed column expression?
- How do I find all the constraints for a specified table?
- How do I find all the indexes for a specified table?
- How do I find all the tables that have a specified column name?
- How do I find all the statistics on a specified object?
- How do I find all the statistics and statistics columns on a specified object?
Modules (Stored Procedures, User-Defined Functions, and Triggers)
- How do I find all the stored procedures in a database?
- How do I find all the user-defined functions in a database?
- How do I find the parameters for a specified stored procedure or function?
- How do I find the dependencies on a specified function?
- How do I view the definition of a module?
- How do I view the definition of a server-level trigger?
Schemas, Users, Roles, and Permissions
No comments:
Post a Comment