Hi ... I have one issue with particular PL SQL query (ordering specific column ), i am trying to limit the number of rows in the query but i wanted to include the tied rows also of that ordering column as well.
I think in 12c we have some function like FETCH FIRST N WITH TIED ROWS but i have older version of Oracle.
Could you please let me know how can I handle this scenario, is it possible with joins or something.
EXAMPLE :
CLM1 CLM2
A1 1
A2 1
A3 1
A3 2
A4 1
A5 1
I want to get the first 3 records of CLM1 but when it matches the next rows i should fetch those also in my result.
sample query i am using but it's not suit for my requirement.
select * from T where rownum <4 order by CLM1
Please help me with this query.