问一条SQL语句的转换
select count(*) from (select row_number()over(partition by housename order by sysdate) num from vHouse where buildid='3') where num=2
如上的 oracle 语法 转换成 sql server的怎么写??
------解决方案--------------------语法是一样的
------解决方案--------------------select count(*)
from
(select row_number()over(partition by housename order by sysdate)
num from vHouse where buildid='3') a
where num=2
------解决方案--------------------多了个别名而已