Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I do a Select Into

Re: How do I do a Select Into

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/04/17
Message-ID: <33557747.1999264@newshost>#1/1

On 16 Apr 1997 20:44:38 GMT, "Shawn Francis" <shawn.francis_at_kp.org> wrote:

>Very simple question. How do select data out of one table and put the
>results into another table.
>
>Example:
>
>Select MedicalRecordNumber, count(*) into newTableName
>From existingTableName
>
>According to the manuals I have I can only do this into variables. Is this
>true?
>

there is:

create table newTableName
as
select MedicalRecordNumber, count(*) cnt   from existingTableName
/

Or if the table exists

insert into table
select ...
/

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Apr 17 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US