This topic created in 2740 days ago, the information mentioned may be changed or developed.
dump 表,包含四个字段 id, name, phone, status
INSERT INTO dump(id, name, phone, status)
SELECT 1, "test", "111", 2
FROM dump where not exists (select * from dump where name = "test" and status = 2)limit 1