且构网

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

Oracle错误处理

更新时间:2022-04-23 16:53:47

使用静态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 ;