How can i determine the name of the ROWGUIDCOL column in an SQL Server 2000 table?
i tried looking through syscolumns, e.g.:
SELECT *
FROM syscolumns
WHERE id = OBJECT_ID('Currencies')
But there is nothing there, or on the MSDN page that looks like rowguidcol.
Easy in SQL Server 2005
In SQL Server 2005 you just have to query sys.columns, e.g.:
SELECT *
FROM sys.columns
WHERE object_id = OBJECT_ID('Currencies')
AND is_rowguidcol = 1
Easy peasey.
You use COLUMNPROPERTY:
In the format of the original question: