Bill Software Engineer
Bill Software Engineer

Reputation: 7782

In SQL, how do I write a "IN" statement for string?

So the IN operator is quite useful to search for integer with multiple criteria:

ID in (1,2,3,4)

How do I do this for string field?

ID like ('A','B','C','D')

Upvotes: 0

Views: 82

Answers (1)

M.Ali
M.Ali

Reputation: 69494

For integer values :

ID in (1,2,3,4)

For character values :

ID IN ('A','B','C','D')

Upvotes: 2

Related Questions