liv a liv a - 1 month ago 5x
SQL Question

SQL Query Where Field DOES NOT Contain numeric value

I have a table with an address street, I want to make sure the address contains the street as well as house/building number (saxon 17)
I want to write an SQL query to find rows where field address does not contain a numeric value. How can I do this?


This can be done using a regular expression:

select *
from the_table
where address_column !~ '[0-9]'

More details about regular expressions and pattern matching can be found in the manual: