-1
我要尋找一個在SQL一些幫助創建使用SQL Server中的標識列,我使用下面的查詢如何與聲明
with t AS
(
select
EmpID, mgrid, HierarchyLevel, Description
from
empdatatest
)
select *
from t
order by empid
我想辦法讓表T有標識列
數據輸出應該像
ID EmpID mgrid HierarchyLevel Description
------------------------------------------
1 201 7 1 Partner
2 202 201 2 Senior Manager
3 221 202 3 Manager
4 343 221 4 employee
5 534 221 4 employee
6 552 221 4 employee
是不是EmpID已經是一個標識列? –