sql - Select all tuples of a Table, with a dummy column showing which tuples satisfy a condition -


if add condition in query gives me filtered results. need result in rows (filtered + unfiltered) shown additional (dummy) column tells me means(say boolean value) specific row met "where condition" .

taking example where condition:

where col1 = 2 

use case add additional column indicating if condition met:

select *, case when col1 = 2                 'true'                else 'false'           end `dummy` your_table 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -