1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| BEGIN
DECLARE
cid number \;
num_test number \;
BEGIN
SELECT COUNT(*) INTO num_test FROM user_tables WHERE RTRIM(table_name) = UPPER('Ma_table') \;
IF num_test = 1 THEN
cid := DBMS_SQL.OPEN_CURSOR \;
DBMS_SQL.PARSE(cid, 'DROP TABLE Ma_table', DBMS_SQL.NATIVE) \;
DBMS_SQL.CLOSE_CURSOR(cid) \;
END IF \;
END \;
END \; ;
create
table Ma_table
( variable1 number not null, nom_var varchar2(12) null,
variable2 number null, nom_var2 varchar2(12) null,
variable3 number null, nom_var3 varchar2(12) null,
variable4 number(37,16) not null, variable5 number(37,16) not null ); |
Partager