OBL
OBL

Reputation: 1357

multiple search condition sql

Is it possible to achieve something like this in sql?

ID!= {2,3}

where ID is a column. Or I have to use multiple OR statements?

Upvotes: 1

Views: 252

Answers (2)

Vimal bhatt
Vimal bhatt

Reputation: 285

You have to try With

ID NOT IN (2,3)

Or

ID <> 2 or ID <> 3

Upvotes: 3

gdoron
gdoron

Reputation: 150253

yes, not in:

ID not in (2,3)

You can read more here.

Upvotes: 5

Related Questions