본문 바로가기

Mysql

중복체크후 insert

insert into table (field1,field2,field3) select '1234','data2','data3' from dual where not exists(select * from table where field1='1234');