SQL papers

N_Cnt Number The DECLARE;
the begin
--- To create the query indicates whether there is
the SELECT COUNT (*) INTO N_Cnt from USER_TABLES the WHERE TableName = 'A';
--- if there is
IF N_Cnt> 0 the then
dbms_output.put_line ( 'A deleted table! ');
Execute immediate' drop table "A" ';
- otherwise,
the else
DBMS_OUTPUT.PUT_LINE (' delete table B ');!
Execute immediate' drop table "B" ';
End IF;
Execute immediate' the CREATE tABLE "A" ( "ID" VARCHAR2 (10), "NAME" VARCHAR2 (10)) ';
End;

Guess you like

Origin blog.51cto.com/14489693/2427835