Friday, March 30, 2012

INFORMATION_SCHEMA and increment

I try to identify the value of increment property of a column.
INFORMATION_SCHEMA does not suppply it.
Somebody know how to get it ?
Thanks
The ANSI standard INFORMATION_SCHEMA views don't expose proprietary
extensions like IDENTITY values. However, you can augment the results using
functions like IDENT_CURRENT. For example:
USE Northwind
SELECT IDENT_CURRENT(
QUOTENAME(TABLE_SCHEMA) +
'.' +
QUOTENAME(TABLE_NAME)
) AS CurrentIdentity
FROM INFORMATION_SCHEMA.TABLES
WHERE
TABLE_SCHEMA = 'dbo' AND
TABLE_NAME = 'Orders'
Hope this helps.
Dan Guzman
SQL Server MVP
"DigitalGus" <papierCrayon@.hotmail.com> wrote in message
news:KFjkc.25427$k%.581253@.news20.bellglobal.com.. .
> I try to identify the value of increment property of a column.
> INFORMATION_SCHEMA does not suppply it.
> Somebody know how to get it ?
> Thanks
>
|||http://www.aspfaq.com/2177
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"DigitalGus" <papierCrayon@.hotmail.com> wrote in message
news:KFjkc.25427$k%.581253@.news20.bellglobal.com.. .
>I try to identify the value of increment property of a column.
> INFORMATION_SCHEMA does not suppply it.
> Somebody know how to get it ?
> Thanks
>
sql

No comments:

Post a Comment