The important thing in life is to have a great aim , and the determination

          導(dǎo)航

          <2008年10月>
          2829301234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          留言簿(7)

          隨筆分類(lèi)

          隨筆檔案

          文章檔案

          相冊(cè)

          閱讀排行榜

          評(píng)論排行榜

          常用鏈接

          統(tǒng)計(jì)

          IT技術(shù)鏈接

          保險(xiǎn)相關(guān)

          友情鏈接

          基金知識(shí)

          生活相關(guān)

          最新評(píng)論

          各種數(shù)據(jù)庫(kù)取表前N條記錄的寫(xiě)法

           

          各種數(shù)據(jù)庫(kù)取表前N條記錄的寫(xiě)法:

          1Oracle

          Select * from table where rowNum<=n

          2.Informix

          Select first n* from table

          3.DB2

          Select * row_number() over(order by col1 desc) as rownum where rownum<=n

           DB2

          Select column from table fetch first n rows only

          4.SqlServer

          Select top n* from table

          5.sysbase

          Select top n* from table

          6.mysql

          Select * from table limit n

          posted on 2008-10-13 10:15 鴻雁 閱讀(496) 評(píng)論(1)  編輯  收藏 所屬分類(lèi): IT技術(shù)相關(guān)

          評(píng)論

          # re: 各種數(shù)據(jù)庫(kù)取表前N條記錄的寫(xiě)法 2008-12-14 10:20 伊珊

          美神惡魔  回復(fù)  更多評(píng)論   

          主站蜘蛛池模板: 集贤县| 秭归县| 始兴县| 洛隆县| 吉隆县| 灵丘县| 承德县| 三门峡市| 伊宁县| 张家界市| 裕民县| 鱼台县| 盈江县| 新营市| 侯马市| 江山市| 隆回县| 建湖县| 大田县| 高雄县| 三原县| 阳山县| 宜章县| 清水河县| 娱乐| 峨眉山市| 东莞市| 故城县| 平凉市| 民县| 博客| 普格县| 恭城| 三明市| 礼泉县| 开鲁县| 虞城县| 环江| 房产| 定边县| 太原市|