Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to create stored procedure to drop and create table

maxellcd1999Mar 26 2012 — edited Mar 26 2012
Version: Oracle 10g

I am trying to create a stored procedure that will drop and create a table based on a select statement. I can create the table but I can't drop it.

CREATE OR REPLACE procedure EC_LOAD is
begin
INSERT INTO Sales_table
(FSCL_WK,
DIV,
ACCT_TYPE)
Select
FSCL_WK,
DIV,
ACCT_TYPE
from
sales_revenue;
end ecload;

I need to drop Sales_table before inserting the values. How do i do this?
This post has been answered by Solomon Yakobson on Mar 26 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2012
Added on Mar 26 2012
2 comments
7,041 views