2026-03-12 20:23:15
This commit is contained in:
12
tpt/demos/ordering_antijoin.sql
Normal file
12
tpt/demos/ordering_antijoin.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
|
||||
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
|
||||
|
||||
SELECT * FROM (
|
||||
select rownum r from
|
||||
all_users where username like 'S%'
|
||||
order by r desc
|
||||
)
|
||||
WHERE r NOT IN (select /*+ HASH_AJ(a) */ rownum FROM all_users a where rownum<= 2)
|
||||
and rownum <= 5
|
||||
/
|
||||
|
||||
Reference in New Issue
Block a user