日期:2014-05-17 浏览次数:20696 次
insert into tra_teachers(ID,NAME,SEX,DEPARTMENT,TEACHER_NO,PID) select '1','2','3','4','5','6' from dual where '1' not in(select ID from tra_teachers)
------解决方案--------------------
用exists
insert into a select 1,'c' from dual where not exists (select id from a where id=2)
------解决方案--------------------