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!

Create table as select & update in stored procedures

2986888Aug 25 2015 — edited Aug 29 2015

Hi,

I'm juste learning how to create stored procedures and through sqldevelopper, I'd like to create a stored procedures which create a table  and import its value from a select statement; after I need to update the table by adding some columns.

The two queries looks like:

CREATE TABLE TBL_MEMBRES_CLEAN AS

SELECT IDM, SNAME, FNAME, DBIRTH, INF1, INF2, INF3, INF4

FROM tbl_membres;

alter table

   tbl_membres

add

   (

   SNAME_CLEAN tbl_membres.SNAME%TYPE, 

   FNAME_CLEAN tbl_membres.FNAME%TYPE,

   COL1 VARCHAR2,

   COL2 VARCHAR2,

   COL3 VARCHAR2,

   COL4 VARCHAR2

   );

Is it possible to make them by using only one procedure ?

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 26 2015
Added on Aug 25 2015
18 comments
4,991 views