Skip to content
Advertisement

SQL Case insensitive IN search

I have this Table "Table" with content:

There are case inaccurate serial numbers stored.

Currently I am selecting there with a statement like

But isn’t there a easier way instead of OR Serial LIKE OR Serial LIKE OR Serial LIKE there are alomst 30 numbers i have to compare with.

Something like this

Advertisement

Answer

The easiest way would be:

That won’t however use an index on the serial column.

So if performance is a concern you would need to create an index on upper(serial).

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