clear markdown compare help best fiddles feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3601395 fiddles created (48023 in the last week).

select sqlite_version();
sqlite_version()
3.27.2
 hidden batch(es)


CREATE TABLE x ( val INT PRIMARY KEY, txt TEXT NOT NULL );
 hidden batch(es)


INSERT INTO x VALUES (1, 'val_1'), (2, 'val_2'), (3, 'val_3'), (4, 'val_4'), (5, 'val_5'), (6, 'val_6'), (7, 'val_7');
 hidden batch(es)


SELECT x.val, x.txt FROM x JOIN ( SELECT ROW_NUMBER() OVER () AS rn, column1 FROM (VALUES (5), (6), (1)) ) AS tab ON x.val = tab.column1 ORDER BY tab.rn;
val txt
5 val_5
6 val_6
1 val_1
 hidden batch(es)