| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Newbie: Help please !
What's wrong in this anonymous block ? When I run this in sqlplus it
complains at the "drop table" line with :
ERROR at line 1:
ORA-06550: line 9, column 3: PLS-00103: Encountered the symbol "DROP" when expecting one of the following:
If I am doing this in a stupid way then please tell me.
Thanks in advance.
declare
nrecs number ;
begin
select count(*)
into nrecs
from user_tables
where table_name = 'ts_user' ;
if nrecs > 0 then
drop table ts_user ;
end if ;
create table ts_user (
user_id char(15) ,
user_name varchar(30) ) ;
![]() |
![]() |