在sqlserver中用下面语句建了一个视图,但是视图中有重复数据,修改语句把重复数据筛掉保持数据唯一性? 10
CREATEviewview_doorasSELECTROW_NUMBER()over(orderByd.DoorID)asID,cast(DevIDasvarchar)...
CREATE view view_door
as
SELECT ROW_NUMBER() over(order By d.DoorID) as ID, cast(DevID as varchar)+cast(DoorID as varchar) AS nID, DoorName AS strFullName
FROM dbo.MJ_MjData d 展开
as
SELECT ROW_NUMBER() over(order By d.DoorID) as ID, cast(DevID as varchar)+cast(DoorID as varchar) AS nID, DoorName AS strFullName
FROM dbo.MJ_MjData d 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询