Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Posts
    2

    Unanswered: problem with UNIONS

    Hi,

    i have written a query using UNION which retrieves some 10 or more records finally afte performing UNION operator but i want only first 5 records. How can i do it. I have done this using ROWNUM with a single query, but how this can be used in UNIONS

    phanik

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    try

    select * from
    (
    select * from table_a union
    select * from table_b
    )
    where rownum<5

Posting Permissions

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