使用此查询:
select *
from
( Select DISTINCT status
From MNPdata
where IMSI_no = 'abc'
)
我得到了:
Msg 102,Level 15,State 1,Line 7')'
附近的语法不正确
答案 0 :(得分:3)
为子查询添加别名:
select *
from (
Select DISTINCT status From MNPdata where IMSI_no = 'abc'
) AS t
由于子查询仅选择status
,因此您可以改为:
Select DISTINCT status From MNPdata where IMSI_no = 'abc'