【发布时间】:2013-01-16 21:50:56
【问题描述】:
数据库中的每条记录都有多个列。
如何选择 X列和 Y列前100名的记录?
【问题讨论】:
数据库中的每条记录都有多个列。
如何选择 X列和 Y列前100名的记录?
【问题讨论】:
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 );
【讨论】: