sql语句取三条数据

2025-02-27 06:35:35
推荐回答(3个)
回答1:

SQL这样写
select top 3 ID、Name、Age
from table where 你的条件集合

ORACLE 这样写
select ID、Name、Age
from table
where rownum <4 and 你的条件集合

回答2:

select top 3 ID、Name、Age
from table; ---sql

select ID、Name、Age
from table
where rownum <4
; ---oracle

回答3:

select ID、Name、Age form 表 where ...