Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> a newbie - pl/sql problem
Hello,
I'm trying to do sth like this:
declare cursor x is (select * from user_tables where table_name='abc'; begin
if x%found then
drop table abc;
end if;
end;
.
/
or, "equivalently" (I know there're errors because otherwise it'd work but I suppose my intension are quite clear to you...):
begin
if (select count(*)m form user_tables where yable_name='abc')>0 then
drop table abc;
end if;
end;
.
/
And it does not work. As far as I've realized there are two problems: the
very condition isn't proper and enforcing dropping the table this way on
Oracle also appears out of my reach...
Oh: one more. Despite doing 'set serveroutput on;' in the console, when
using "put_line" or "put" in pl/sql scripts, I'm given back: "PLS-00201:
identifier 'PUT_LINE' must be declared".
What do I do wrong?
Thanks for all answers. :-)
Best regards.
-- Marcin BalcerzakReceived on Sun Jan 30 2005 - 09:20:31 CST