M
M
Mikhail Ksenofontov2022-03-31 17:43:17
PostgreSQL
Mikhail Ksenofontov, 2022-03-31 17:43:17

LIKE operator to search for characters?

Hello.

I wondered, using the LIKE operator, you can find all the characters and letters without listing them?
The table is all in VARCHAR and you need to find everything that is not numbers!

Thank you Michael

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Golovanenko, 2022-03-31
@KsenoLv

I think it would be more practical to use regular expressions . This is how you can select all records where the column column does not contain numbers:

SELECT * FROM your_table WHERE column ~ '^[^0-9]+$'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question