我想 Select 与所选值相同的所有行.例如:
id | phone_num | name |
---|---|---|
1 | 0123456789 | VALUE 1 |
2 | 0123456789 | VALUE 2 |
3 | 0987654321 | VALUE 3 |
例如:我想 Select 号码1的ID电话号码,然后判断电话号码是uniqe还是重复的.
我try 了这个查询,但没有成功:
SELECT *
FROM customers a, (SELECT b.phone_num as phone_search
FROM customers b
WHERE b.id = "1") AS total
WHERE phone_num LIKE "%"|| total.phone_search ||"%"