postgreSQLã«ã¯limit offsetãããæã«ã¯é常ã«ä¾¿å©ãªæ©è½ã Oracleã®å ´åãROWNUMã使ã£ã¦ä¼¼ããããªäºãåºæ¥ã¾ãã Oracleã«ããã¦ãHOGEãã¼ãã«ã®æ¤ç´¢çµæã®ä¸ããæåã®10件ãåå¾ãããå ´å㯠select * from HOGE where rownum <= 10;ã¾ã㯠select * from HOGE where rownum between 1 and 10;ã¨ãã¾ããããã¯ä¸è¬çã«ãã使ãããæ¹æ³ã¨æãã¾ãã ã§ã¯ã10件ç®ãã5件åå¾ãããã¨ãªã£ãå ´åã¯ã©ãã§ãããã ä¸è¨ã¨åãããã« select * from HOGE where rownum between 10 and 15;ã¾ã㯠select * from HOGE where 10 <= rownum and rownum <= 15;ã¨ããã°è¯ãã®ã§ã¯ï¼ã¨æãã¾ãã
{{#tags}}- {{label}}
{{/tags}}