Home > SQL Server, T-SQL > SQL Identity – Catalog View – SQL Server

SQL Identity – Catalog View – SQL Server


sys.Identity_columns : catalog view contains information for each identity column in a table in that database. This view contains identity column information such as seed, increment, last_value and etc. This view also contains information from the sys.columns view.

Basic column definition for sys.identity_columns vies as given below:

pic1

Example

1. Execute sys.identity_columns view with select query

use AdventureWorks2012

select * from sys.identity_columns
go

Output
pic2

2. Executing sys.columns to see the inherited columns in sys.identity_columns

Query

use AdventureWorks2012

select * from sys.columns
GO
Output

pic3

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: