Jaa


Viewing a Table

After you have created the tables in a database, you may have to find information about the table properties, such as the name or data type of a column or the nature of its indexes, but most importantly, you will have to view the data in the table.

You can also display the dependencies of the table to determine which objects, such as views, stored procedures, and triggers, depend on the table. If you make any changes to the table, dependent objects may be affected.

To view the definition of a table

sp_help (Transact-SQL)

To view the data in a table

SELECT (Transact-SQL)

To obtain information about tables

sys.tables (Transact-SQL)

To obtain information about table columns

sys.columns (Transact-SQL)

COLUMNPROPERTY (Transact-SQL)

To obtain information about table columns that are computed

sys.computed_columns (Transact-SQL)

To view the dependencies of a table

sys.sql_dependencies (Transact-SQL)

See Also

Concepts

Query Fundamentals
Viewing Index Information

Help and Information

Getting SQL Server 2005 Assistance