D
D
dmitred2020-05-27 05:47:55
MySQL
dmitred, 2020-05-27 05:47:55

How to make a selection from a Mysql table by a value in a field other than numbers?

Greetings!
Please tell me mysql.
There is a `chanel`( VARCHAR) field of the record which can be numeric 123345 or 'test_chanel' or string literal.
Forgive me if the wording is incorrect)
Is it possible using Mysql in the WHERE clause to somehow make a selection exactly where it is not equal to a number.
The database is relatively large and I don’t want to sort it out using php.
Thanks for the answer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
ayazer, 2020-05-27
@ayazer

www.sqlfiddle.com/#!9/4d39ea/1/0

select * from users 
where value NOT REGEXP "-?^[0-9]*.?[0-9]*$"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question