我使用DISTINCT和ROW_NUMBER()进行MSSQL查询,
QUERY IS:
SELECT * from
(select ROW_NUMBER() OVER (ORDER BY b.tc_priority ) AS row,
DISTINCT a.tc_id
from release_details a, tc_details b
where a.tc_id=b.tc_name
and
tst_system is null
and release_name='sdkfei'
and tenv_id='32'
and env_id='32'
and tst_type='21'
and b.autotech='ITL'
and a.project=b.project
and a.project='JupiterQA'
and depclosed=1) AS tab12
WHERE row BETWEEN 1 AND 5
错误是: 关键字' DISTINCT'
附近的语法不正确此查询有问题吗?