Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Create a table from query (Oracle Novice)
Willie S Coggins wrote:
>
>
> I discovered afte some reading how to apply SELECT INTO and CREATE TABLE
AS
> to create a table from an existing table via a query. However, I still
need
> help to find out how to solicit user input to retrieve sorted information
> from a table. Can someone offer some assistance?
> Will
>
>
> "Willie S Coggins" <coggins_at_acsu.buffalo.edu> wrote in message
> news:9i5c80$f5r$1_at_prometheus.acsu.buffalo.edu...
> > I have two questions.
> > How can one create a table from an Oracle SQL query?
> > How can I get users to enter parameters in a query?
> >
> > Will
> >
> >
>
Create table Emp2
As
Select Empno,Name,Job,Salary
from EMP1
Where Deptno IN (100,200)
The example above create a table EMP2, which contain the Employee Number(Empno), Employees' Name(Name), Employee's Job(Job), and Employees' Salary whose is working in either Department Number(Deptno) 100 or 200. The data for EMP2 table is coming form EMP1.
Select *
From EMP2; (This will bring up all the data from the EMP2 table)
>
-- Posted via CNET Help.com http://www.help.com/Received on Sat Jul 07 2001 - 22:30:10 CDT