开发者

Unique id of a column

开发者 https://www.devze.com 2022-12-25 18:16 出处:网络
Does each column of a tab开发者_运维百科le 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 co

Does each column of a tab开发者_运维百科le 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.


The answer is no. Oracle maintains a unique id of a column (Progress database does this as well), but SQL Server does not.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消