0

当我从多个表中选择时,我希望在我的结果中有一个 ROWNUM 列。这可能吗?我怎样才能做到这一点?

我的查询类似于:

select rownum, xx,zzz,aaa,aaa  
from table1, table2, table3  
where condition1  
     and condition2  
     and condition3  
4

1 回答 1

0

对的,这是可能的 。使用 T-SQL ROW_NUMBER 函数。

如此处所述。

否则,您可以实现这一点,而无需使用此处的函数: sql-rownum-how-to-return-rows-between-a-specific-range

于 2014-04-12T22:58:20.363 回答