sql - Oracle Database Rownum Between -
there 25 records in sql query want between 5 , 10. how can ? use 11g
select ( select count(*) sayfasayisi konular t t.kategori not null ) sayfasayisi, t.id, t.uye, t.baslik,t.mesaj,t.kategori,t.tarih, t.edittarih,t.aktif,t.indirimpuani,t.altkategori,t.link, nvl( (select case when t.id = f.konuid , f.uye = 'test' '1' else '0' end takipkonu f t.id = f.konuid , f.uye = 'test'), '0') takip konular t t.kategori not null
you can use row_number()
assign row number based on ordering logic contained in current query, e.g. column. then, retain 5th 10th records:
select t.* ( select ( select count(*) sayfasayisi konular t t.kategori not null ) sayfasayisi, row_number() on (order some_col) rn, t.id, t.uye, ... ) t t.rn between 5 , 10;
Comments
Post a Comment