Dynamic table name
Date: 1996/05/10
Message-ID: <3193B973.5793_at_teleglobe.ca>#1/1
I would like to submit the following statement using a SQL*PLUS script :
drop public synonym TABLE_01 ;
create public synonym TABLE00 for TABLE_01;
The table name 'TABLE_01' will be identified dynamically when then sql*plus script is submitted (Example : tab table name coub be TABLE_01, TABLE_02, TABLE_03...) In my SQL*PLUS script , I create a PL/SQL block that returns the table name 'TABLE_01', i do not know how to compose the two SQL statement above using this specific table name ? Naturally, it should be performed in only one SQL*PLUS script.
There is an example :
BEGIN
...
tablename := .... ;
...
END ;
/* suppose the variable 'tablename' has the value 'TABLE_01' */
drop public synonym &tablename; (?)
create public synonym &tablename for &tablename; (?)
Thank you in advance
Alain Turcotte
email : aturcott_at_teleglobe.ca
Received on Fri May 10 1996 - 00:00:00 CEST