Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Dropping & re-Creating Sequences in PL/SQL
Since those particular statements are considered DDL statements, you need
to use the DBMS_SQL commands to execute them within a pl/sql package.
Christine Turner
Database Administrator
IPS-Sendero
Scottsdale, Arizona
Phone: (800) 321-6899 ext. 3286
Fax: (480) 946-8224
E-mail: christine.turner_at_ips-sendero.com
-----Original Message-----
From: Mike & Martha [SMTP:mmrose_at_home.com] Sent: Wednesday, June 28, 2000 7:09 AM To: Multiple recipients of list ORACLE-L Subject: Dropping & re-Creating Sequences in PL/SQL
Hello,
I've been unable to get the following commands to 'compile' in a PL/SQL package body in Oracle 8.1.6 Version 2 (8i with NTS 4.0 SP 6a):
DROP SEQUENCE sequence_name;
CREATE SEQUENCE sequence_name;
I get errors like the commands aren't recognized.
When I try to use EXECUTE IMMEDIATE 'DROP SEQUENCE sequence_name'
I still get compile errors.
I can compile when I use to following:
Temp VARCHAR2(60);
Temp := 'DROP SEQUENCE sequence_name';
EXECUTE IMMEDIATE Temp;
I would really appreciate some help here!
Michael Rose
mmrose_at_home.com
-- Author: Mike & Martha INET: mmrose_at_home.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jun 28 2000 - 02:18:23 CDT