为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:dm8
【操作系统】:window
【CPU】:i5
【问题描述】*:请教下这里哪里有问题
这样就可以,这声明一个变量来判断if和用exists有区别吗
可以这样试试
declare
begin
if exists (select * from aa.aa where a1='cc') then
select * from aa.aa where a1='cc' ;
else
select count(*) from aa.aa where a1='cc' ;
end if;
end
select语句后加上分号试试?