Hi. Does each column of a table in SQL Server have a unique id? I've looked into sys.columns and the column_id there is merely the order of the columns which changes if the order of the column is changed. I'd like to know if SQL Server maintains a unique id for each column as it does for each table and other objects. And if it does, how can I get that? Thanks.
+1
A:
The answer is no. Oracle maintains a unique id of a column (Progress database does this as well), but SQL Server does not.
codingguy3000
2010-04-07 13:11:31
Thanks for the info.
Kayes
2010-04-07 21:16:43
A:
If you are trying to get a column which table A and B both contains, you could use
SELECT A.col or B.col
However if you are trying to get the unique id from the master control, it seems not really possible for SQL server
Dante Y
2010-04-07 19:15:23