Heim > Fragen und Antworten > Hauptteil
PHP中文网2017-04-17 15:33:04
谢谢邀请。用find_in_set
函数试试看
SELECT id FROM table WHERE find_in_set('EC:XX', mac) OR find_in_set('DD:XX', mac);
伊谢尔伦2017-04-17 15:33:04
SELECT mac FROM (
SELECT DISTINCT mac, username FROM ORDER
) AS tmp
GROUP BY mac
having count(1) > 1
不知道有没有写错,没有测试,但估计性能不会很好,毕竟涉及到disintct
和group by
操作。