Skip to content
Advertisement

How to filter the record based on two columns in sql

i have a table with 2 columns and i wanted to filter the records where column1 in (Hierarchy,Single) and column2 in (‘Relate’, ‘NoRelate’). but not return the record when Column1 = Single and Column2 = NoRelate.

Expected Output

Advertisement

Answer

I would just write out your conditions here:

screen capture from demo link below

Demo

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement