Information Schema and SQL Server 2005
page 2 of 4
by Uday Denduluri
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 24098/ 83

Description

The table given below shows the views that are supported by SQL server 2005 as a part of information schema.

Table 1

View

Contains information about

COLUMNS

Columns accessible to the current user in the current database.

INDEXES

Indexes in the current database.

KEY_COLUMN_USAGE

Keys in the current database.

PROVIDER_TYPES

Data types supported in SQL Server Mobile.

TABLES

Tables accessible to the current user in the current database.

TABLE_CONSTRAINTS

Table constraints in the current database.

REFERENTIAL_CONSTRAINTS

Foreign constraint in the current database

The table given below explains the usage pattern of Information Schema.

Table 2

select * from INFORMATION_SCHEMA.Columns where table_name = "tablename"

Returns the schema information about the columns in the table.

select * from INFORMATION_SCHEMA.Tables where table_name = "tablename"

Returns the metadata information about the table name specified.

select * from INFORMATION_SCHEMA.Columns

Returns the column information of the entire tables in the database.

select * from INFORMATION_SCHEMA.Tables

Returns the table information of all the tables in the database.

select * from INFORMATION_SCHEMA.Table_Constraints where Table_name = "tablename"

Returns the constraint information of the table in the database.

select * from INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS

Returns the information of the referential constraints in the database.


View Entire Article

User Comments

Title: Schema   
Name: Sankar
Date: 2008-08-29 5:57:45 AM
Comment:
It's very useful... thanks lot....






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2019 ASPAlliance.com  |  Page Processed at 2019-12-08 7:57:21 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search