Home > database >  Check values of a column and return the row
Check values of a column and return the row

Time:09-28

I'm trying to create a query that checks my table and if it finds a value that does not match my parameter, return the row.

For example this is table A:

enter image description here

I have another table (table B), that contains the value 1.2 that I will use as my parameter.

So, in this example, I need to return all the rows that are not 1.2

The value in Table B, can change, so I need to get it in real time (with a select)

I've been trying different approaches, but with no luck so far.

Thank you in advance!

CodePudding user response:

select *
from   t
where  sv not in(select sv from t2) 
sv client
1.1 john
1.1 ron
1.1 george

Fiddle

  • Related