Last chance! 50% off unlimited learning
Sale ends in
PREFERRING
clause of a database query in different SQL dialects which support preferences.show.query(p, dialect = "EXASOL")
PREFERRING
-clause (in some rarely used dialects also SKYLINE OF
).
For example consider a database table r(a,b). The preference selection psel(r, low(a) * high(b))
can be expressed by (in the Exasol dialect):
SELECT * FROM r PREFERRING LOW a PLUS HIGH b
The show.query
function generates just the PREFERRING-clause, i.e. show.query(low(a) * high(b))
returns
PREFERRING LOW a PLUS HIGH b
As usual in SQL queries all keywords are not case sensitive, i.e. PLUS
or plus
does not make any difference.show.query(low(a) * high(b))
show.query(low(a) * high(b), dialect = 'Preference SQL')
Run the code above in your browser using DataLab