if not EXISTS(select * from table1 where a='2')
insert into table1 values('2','2','2')这样的语句oracle不支持
if not EXISTS(select * from table1 where a='1') then
insert into table1 values('2','2','2')
总说语句非法.
不知道怎么显示类似的功能
写判断表中是否由此语句.
如果没有就添加
insert into table1 values('2','2','2')这样的语句oracle不支持
if not EXISTS(select * from table1 where a='1') then
insert into table1 values('2','2','2')
总说语句非法.
不知道怎么显示类似的功能
写判断表中是否由此语句.
如果没有就添加
select count(*) into cnt from table1 where a='1';if cnt > 0 then
insert into table1 values('2','2','2')
end if;这样就可以拉!
where exists
select 1 from table1 where a='2')