oracle常用的五個(gè)函數(shù) oracle里面怎么取一條數(shù)據(jù)?
oracle里面怎么取一條數(shù)據(jù)?select * from test where rownum=1可以取到第一條,但你能這樣用:select * from test where rownum=2不能說
oracle里面怎么取一條數(shù)據(jù)?
select * from test where rownum=1可以取到第一條,但你能這樣用:select * from test where rownum=2不能說我直接取第二條。select * from test where rownum 0 and tt.r
oracle中只讀取一條數(shù)據(jù),怎么寫?
select*fromtestwhererownum=1可以取到第一條,但你能這樣用:select*fromtestwhererownum=2不能說我直接取第二條。select*fromtestwhererownum<=5你也可以這樣用,取前5條。rownum只能是連續(xù)的,而且必須是從1開始的最常用的用法如下:select*from(selectrownumr,*fromtest)ttwherett.r>0andtt.r<=3這樣你就可以取任意的位置的記錄了。比如我想取第二條:select*from(selectrownumr,*fromtest)ttwherett.r=2