这样的查询语句怎么写?
根据条件在表中查询出两组数据,我现在只想得到其中的一组数据作为结果,这样的sql该怎么写?
[解决办法]
select * from table where .. and rownum < 2
[解决办法]
select * from (select t.*,rownum as fid from table t where .. ) where fid < 2
发布时间: 2012-03-06 20:47:55 作者: rapoo
这样的查询语句怎么写?
根据条件在表中查询出两组数据,我现在只想得到其中的一组数据作为结果,这样的sql该怎么写?
[解决办法]
select * from table where .. and rownum < 2
[解决办法]
select * from (select t.*,rownum as fid from table t where .. ) where fid < 2