根据oracle判断语句结果,进行循环语句

DECLARE
CURSOR TEMP IS SELECT CREDITZS_CODE,ATTRIBUTE_CODE,ATTRIBUTE_INFO_TYPE FROM CREDIT_DIRECTORY_ATTRIBUTE T,CREDIT_DIRECTORY_TREE E WHERE T.TREE_ID=E.ID AND ATTRIBUTE_INFO_TYPE=‘number‘AND ATTRIBUTE_CODE IN(‘CF_NR_FK‘,‘CF_NR_WFFF‘);
STR VARCHAR2(100) := ‘‘;
BEGIN
FOR S IN TEMP LOOP
STR := ‘ALTER TABLE ‘||S.CREDITZS_CODE||‘ MODIFY(‘||S.ATTRIBUTE_CODE||‘ NUMBER(30,4))‘;
DBMS_OUTPUT.PUT_LINE(STR);
BEGIN
EXECUTE IMMEDIATE STR ;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(‘错误更新语句‘||STR);
END;
END LOOP;
END;

根据oracle判断语句结果,进行循环语句

上一篇:sqlmap 笔记


下一篇:mysql的事务四个特性以及事务的四个隔离级别