比如sql里可以这样写:
select @pid=pid from talbe.
orcale里怎么写.
还有if怎么写。我在oracle里写
if exists(select 1 from ghosthjt.businfo)
select max(case when nid is null then 0 else nid) from ghosthjt.businfo
else
select 1 from dualSP2-0734: 未知的命令开头 "if exists(..." - 忽略了剩余的行。
select max(case when nid is null t如果不能这么写,会带来很多不便,比如调试存储过程。
select @pid=pid from talbe.
orcale里怎么写.
还有if怎么写。我在oracle里写
if exists(select 1 from ghosthjt.businfo)
select max(case when nid is null then 0 else nid) from ghosthjt.businfo
else
select 1 from dualSP2-0734: 未知的命令开头 "if exists(..." - 忽略了剩余的行。
select max(case when nid is null t如果不能这么写,会带来很多不便,比如调试存储过程。
if .......then
end if;
select max(case when nid is null then 0 else nid) from ghosthjt.businfo
else
select 1 from dual
可以写为:
select 1 into num from ghosthjt.businfo;
if num>0 then
.....
else