1

数据库中的每条记录都有多个列。

如何选择那些同时属于X列Y 列中前 100 条记录的记录?

4

1 回答 1

4
select *
from table_name
where column_x in (
    select top 100 column_x
    from table_name 
    order by column_x )
and column_y in (
    select top 100 column_y
    from table_name
    order by column_y );
于 2013-01-16T21:53:05.010 回答