-
Notifications
You must be signed in to change notification settings - Fork 0
2.3 Dynamic query in pl sql
thuantt0101 edited this page Jan 1, 2020
·
2 revisions
/* dynamic query in pl sql 1*/
declare
nRET number;
begin
EXECUTE IMMEDIATE 'select count(*) from R00DMDVCS '
into nRET;
DBMS_OUTPUT.PUT_LINE(nRET);
end;
/* dynamic query in pl sql 2*/
declare
nRET number;
vSQL_QUERY VARCHAR2(2000);
begin
vSQL_QUERY := 'select count(*) from R00DMDVCS ';
EXECUTE IMMEDIATE vSQL_QUERY
into nRET;
DBMS_OUTPUT.PUT_LINE(nRET);
end;