Results 1 to 2 of 2

Thread: sql to limit

  1. #1
    Join Date
    Dec 2010
    Posts
    2

    Unanswered: sql to limit

    hi expert, i'm having following sql

    SELECT E.SEQ_NO, E.SUBJECT, M.SUBMODULE_NAME, E.SEND_STATUS, E.SEND_DT, E.CREATE_DT, E.CREATE_ID FROM PR_SEND_EMAIL E, UA_SUBMODULE M
    WHERE E.SUBMODULE_ID = M.ID order by E.SEQ_NO desc,E.CREATE_DT desc

    this will return all record, but now looking for sql where to get record for 0-10, or 11-20, or 21-30 for pagination,

    when i search there is keyword limit, offset, skip but its not support by informix, do anyone can guide me,

    thanks in advance

  2. #2
    Join Date
    Jul 2010
    Posts
    7
    Informix:
    SELECT FIRST 10 * FROM T order by a

    Informix (row numbers are filtered after order by is evaluated. SKIP clause was introduced in a v10.00.xC4 fixpack):
    SELECT SKIP 20 FIRST 10 * FROM T order by c, d

    For more sql statements, you can check out: sql statements

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •