?
Solved

T-SQL QUESTION - SQL SERVER 2000 - SELECT ROWGUIDCOL FROM NEWTABLE - DOES NOT WORK - WHY?

Posted on 2006-05-13
4
Medium Priority
?
308 Views
Last Modified: 2008-02-01
Supposedly the following Select is valid assuming you have a valid field property built in the table:

SELECT ROWGUIDCOL FROM NEWTABLE

Mine does not.  Do you know why?

Further, are there other syntax to point to actual columns with a generic call?
0
Comment
Question by:michaelrobertfrench
2 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 16673806
SELECT ColumnProperty(OBJECT_ID('urtable'), 'ColumnName', 'IsRowGuidCol')
0
 
LVL 27

Assisted Solution

by:ptjcb
ptjcb earned 500 total points
ID: 16682378
ROWGUIDCOL is a property of a column, not (usually) a column name. Your SELECT statement would work if  ROWGUIDCOL was the name of the column. That's why aneeshattingal's query would work.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question