Sql case with case Order by
select id, username, email,
case
when username = email then 'true'
else 'false'
end
from users
Is there a simple way to do when username = email then 'true' as order_col
or from users where case = true
The question is can you wrap case in AS caseand then order it or use Where
statement on that case.
No comments:
Post a Comment