sql - postgresql offset specific column -


how select after articleid specific offset start

e.g start 28 28, 27, 26  offset = 28; limit = 3;  var query = 'select * "article" order "publishdate" desc limit $2 offset $1';  articleid | publishdate  25 | "2015-08-19 15:33:37" 26 | "2015-08-19 17:05:42" 27 | "2015-08-19 17:06:05" 28 | "2015-08-19 17:06:22" 29 | "2015-07-19 17:06:46" 30 | "2015-08-19 17:08:11" 

since value of articleid can in where clause try this

select *  article  articleid >= 28 , articleid <= 28 + 3 

or if articleid not consecutive

select *  article  articleid >= 28  order articleid limit 3  

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -

java - How can I send the data from a imput type="file" to the controller? -