Examples of MAKE_DBKEY
-
Select record using relation name (note that relation name is uppercase)
select * from rdb$relations where rdb$db_key = make_dbkey('RDB$RELATIONS', 0)
-
Select record using relation ID
select * from rdb$relations where rdb$db_key = make_dbkey(6, 0)
-
Select all records physically residing on the first data page
select * from rdb$relations where rdb$db_key >= make_dbkey(6, 0, 0) and rdb$db_key < make_dbkey(6, 0, 1)
-
Select all records physically residing on the first data page of 6th pointer page
select * from SOMETABLE where rdb$db_key >= make_dbkey('SOMETABLE', 0, 0, 5) and rdb$db_key < make_dbkey('SOMETABLE', 0, 1, 5)