example pseudo-sql
SELECT *, condlabel FROM tbl WHERE cond1:(col1 = 1) OR cond2:(col2 = 2 and col3 = 4)
so the results will have additional column with exact condition label which they are satisfy
example pseudo-sql
SELECT *, condlabel FROM tbl WHERE cond1:(col1 = 1) OR cond2:(col2 = 2 and col3 = 4)
so the results will have additional column with exact condition label which they are satisfy
2
Answers
as AymDev commented, perfect solution is to add conditions in select block with
as
aliasingNo, you can only label (create aliased expressions) in a
SELECT
clause, and you cannot use those in aWHERE
clause, but you can use a subquery to achieve this:Alternatively just repeat them: