declare
tablename varchar2(64);
r_name varchar2(256);
shop_id number;
sql_str varchar2(500);
begin
tablename:='dp_shop';
shop_id:=838113;
execute immediate 'select name from '||tablename||' r where r.shop_id=:1' into r_name using shop_id;
dbms_output.put_line(r_name);
end;
oracle 动态SQL
最新推荐文章于 2024-01-20 10:20:21 发布