anyone knows how to do a pagination in stored procedure, i am working on datatables and had to use stored proc but never used pagination there
m
Myka Forrest
05/06/2023, 7:46 PM
what database are you using? If I"m understanding correctly, couldn't you pass the offset/fetch as arguments of the SP, and and then use them in the SP just like any other query?
g
gsr
05/06/2023, 7:46 PM
Mssql
gsr
05/06/2023, 8:13 PM
Hmm
Let me try that if it works
But my concern here is I want those to be conditional because same stored procedure will be used for other purpose where this is not a requirement
m
Myka Forrest
05/06/2023, 8:26 PM
you can likely set default fetch/offset values that will pull everything.