且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Oracle 错误处理

更新时间:2021-07-30 15:51:10

使用静态 SQL 无法做到这一点.代码正在编译而不是执行时会出现错误.试试这个:

You can't do that with static SQL. The error is coming when the code is being compiled, not executed. Try this instead:

 execute immediate 'select name_of_factory from car where car_id = 1' 
                    into car_name ;