Hi,
I am trying to execute the following PL/SQL code which is resulting in errors, obviously I am not doing it right, but it gives you an idea what I am trying to do :
DECLARE
var_count INT;
SELECT COUNT(*) INTO var_count
FROM sys.all_tables WHERE OWNER = 'SAKILA' AND table_name = 'ACTOR' ;
if var_count > 0 then
BEGIN
DROP TABLE 'ACTOR' ;
END;
/
Erros :
SELECT COUNT(*) INTO var_count
*
ERROR at line 3:
ORA-06550: line 3, column 1:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
begin function pragma procedure subtype type <an identifier>
<a double-quoted delimited-identifier> current cursor delete
exists prior
The symbol "begin" was substituted for "SELECT" to continue.
ORA-06550: line 7, column 1:
PLS-00103: Encountered the symbol "DROP" when expecting one of the following:
( begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
Your assistance in creating it in a right way will be appreciated.
Many thanks.
Tonya.