H
H
HexUserHex2020-06-02 20:19:17
SQL
HexUserHex, 2020-06-02 20:19:17

What is the easiest way to implement this SQL query?

Good evening,
there is a column containing phone numbers, you need to select a number knowing only a few digits. For example, find all numbers containing this mask: +7986 XXXXX 20.

SELECT* FROM numbers WHERE number LIKE '+7986 можно так реализовать ? 20';

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2020-06-02
@HexUserHex

It's all right?

SELECT * FROM `phones` WHERE `number` LIKE '+7986%20'

Those. put % instead of unknown numbers

D
Dr. Bacon, 2020-06-02
@bacon

+7986_____20

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question