Home » SQL & PL/SQL » SQL & PL/SQL » how to execute a string in PL/SQL
how to execute a string in PL/SQL [message #39716] Sun, 04 August 2002 20:50 Go to next message
llz
Messages: 14
Registered: June 2002
Junior Member
Hi, who can tell me how to execute a string in PL/SQL,
eg
create or replace ttt
is
s :varchar(100);
begin
s :='create table test (f varchar2(10) ';
//////////
how execute s???????????????
end;
Re: how to execute a string in PL/SQL [message #39758 is a reply to message #39716] Wed, 07 August 2002 11:18 Go to previous message
Peter
Messages: 62
Registered: August 2000
Member
initialize your string variable:
myStr varchar2(500);
and build it as necessary (based upon user input I assume);
once you've figured out all your permutations, simply execute as:
OPEN p_cursor FOR
myStr;
Previous Topic: can JDBC deal with PL/SQL function calls with index by table parameters??
Next Topic: Can I use a PL/SQL function in a SQL SELECT statement
Goto Forum:
  


Current Time: Thu Apr 18 17:48:05 CDT 2024