Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dynamic SQL Example declare l_depnam varchar2(20) := 'testing'; l_loc varchar2(10) := 'Dubai'; begin execute immediate 'insert into dept values (:1,:2,:3)'

Similar presentations


Presentation on theme: "Dynamic SQL Example declare l_depnam varchar2(20) := 'testing'; l_loc varchar2(10) := 'Dubai'; begin execute immediate 'insert into dept values (:1,:2,:3)'"— Presentation transcript:

1 Dynamic SQL Example declare l_depnam varchar2(20) := 'testing'; l_loc varchar2(10) := 'Dubai'; begin execute immediate 'insert into dept values (:1,:2,:3)' using 50, l_depnam, l_loc; commit; end;

2 Dynamic SQL Example 2 declare l_depnam varchar2(20) := 'testing'; l_loc varchar2(10) := 'Dubai'; begin execute immediate 'insert into dept values (‘ || 50 || ‘, ‘ || l_depnam || ‘, ‘ || l_loc || ‘)‘ ; commit; end;

3 Static SQL Example declare l_depnam varchar2(20) := 'testing'; l_loc varchar2(10) := 'Dubai'; begin INSERT INTO dept VALUES (50, l_depnam, l_loc); commit; end;


Download ppt "Dynamic SQL Example declare l_depnam varchar2(20) := 'testing'; l_loc varchar2(10) := 'Dubai'; begin execute immediate 'insert into dept values (:1,:2,:3)'"

Similar presentations


Ads by Google