Welcome dear readers you will find good technical information here
Querying the SQL Server System Catalog FAQ
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 How do I find all the owners of entities contained in a specified schema? How do I find the permissions granted or denied to a specified principal?
The sections below list frequently asked questions by category.
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?
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?
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?
How do I find all the owners of entities contained in a specified schema?
How do I find the permissions granted or denied to a specified principal?
ANSWERS: http://msdn.microsoft.com/en-us/library/ms345522.aspx