Monday, February 20, 2012

IsRowGuid

Dear Experts
How to find out whether the IsRowGuid flag is set for a particular column or not?
I tried the system tables like syscolumns, sysconstraints etc., I also tried the INFORMATION_SCHEMA view, but to no avail.
Can anybody help me out.
ThanksLook out for COLUMNPROPERTY in The Holy Book (SQL Server Books Online).

COLUMNPROPERTY
Returns information about a column or procedure parameter.

Syntax
COLUMNPROPERTY ( id , column , property )

Arguments
id

Is an expression containing the identifier (ID) of the table or procedure.

column

Is an expression containing the name of the column or parameter.

property

Is an expression containing the information to be returned for id, and can be any of these values.

Property : IsRowGuidCol
The column has the uniqueidentifier data type and is defined with the ROWGUIDCOL property.

Value Returned
1 = TRUE
0 = FALSE
NULL = Invalid input

No comments:

Post a Comment