How not to select rows with values between an informed list of values

-1

Instead of using the logical operator of != , I'd like to use a code that does the query by disregarding a list of values such as In only the reverse.

Select from teste where teste1 (código) ('x','y','a','g')

I'm using != but I need to write a lot of command lines to get what I need, because it's a lot of data I do not need to be queried.     

asked by anonymous 20.02.2017 / 15:35

1 answer

1

Use Not In

Select from Tabela where Coluna Not In ('x', 'y', 'a', 'g')
    
20.02.2017 / 15:38