关于达梦8管理工具执行多行sql语法错误问题
if not exists(select 1 from WAP_CONFIG2.AUTH_APP where 1=0) THEN select * from WAP_CONFIG2.AUTH_APP where 1=1; ELSE select * from WAP_CONFIG2.AUTH_APP where 1=1; END IF;
如上sql在达梦8管理工具会报语法错误,以上可以通过 begin end;解决
begin if not exists(select 1 from WAP_CONFIG2.AUTH_APP where 1=0) THEN select * from WAP_CONFIG2.AUTH_APP where 1=1; ELSE select * from WAP_CONFIG2.AUTH_APP where 1=1; END IF; end;