Skip to content
Advertisement

SQL Where statement for strings

I have a column that’s string and I would like to use a WHERE statement for all strings that begin with the “sea_”

Any ideas on how to achieve that will be appreciated.

Thanks in advance

Advertisement

Answer

It’s not clear what exactly your where clause should do. If necessary, you should please add more information. Anyway, in general, you can do such a select:

SELECT column FROM table WHERE column LIKE 'sea_%'

The % means that zero, one or more characters can follow. If you need further conditions like an exact number of trailing characters etc., you please must specify your question.

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