Jcat
          寵辱不驚,閑看庭前花開花落~~
          posts - 173,comments - 67,trackbacks - 0
          --same function different database: find the first 5 rows
          ?
          select top 5 * from some_table???????????????????????????????????????? -- sql server

          select * from some_table rownum >=1 and rownum<=5?? -- oracle (begin at 1)
          ?
          select * from some_table limit 0, 5??????????????????????????????????? -- mysql (begin at 0)
          ?
          select * from some_table limit 5 offset 0??????????????????????????? -- postgreSQL (begin at 0)


          --however, if you want to implement between 10 to 20 in SQL SERVER, you have to use following trick
          select top 10 * from
          (select top 20 * from some_table) t
          order by t.primary_key desc
          posted on 2006-12-13 14:34 Jcat 閱讀(190) 評論(0)  編輯  收藏 所屬分類: Database
          主站蜘蛛池模板: 武威市| 云南省| 浮山县| 盈江县| 墨脱县| 桐乡市| 湟中县| 兴安县| 娱乐| 土默特右旗| 集安市| 旺苍县| 甘谷县| 共和县| 金寨县| 汾阳市| 舒兰市| 淮安市| 唐河县| 安西县| 大英县| 闽侯县| 元朗区| 安宁市| 图们市| 康马县| 罗田县| 东光县| 腾冲县| 辽宁省| 安乡县| 喀喇沁旗| 曲水县| 修武县| 安岳县| 屏边| 定州市| 山东省| 民县| 红原县| 墨竹工卡县|