Snippet Name: TABLE - Using Select Statement With Data
Description: Create Table Using a Select statement
CREATE TABLE AS creates a table from the result of a SELECT statement. All of the expressions that can be used in a SELECT statement can be used in a CREATE TABLE AS statement. You can also include all of the data from the table or tables that you are selecting from.
Language: PL/SQL Highlight Mode: PLSQL Last Modified: March 11th, 2009
CREATETABLE test3 ASSELECT table_name, tablespace_name
CREATETABLE ctas ASSELECT table_name, tablespace_name
WHERE1=2;-- For example, create a table named EMPLOYEE3 that includes all -- of the column definitions from EMPLOYEE where the DEPTNO = D11.CREATETABLE EMPLOYEE3 AS(SELECT PROJNO, PROJNAME, DEPTNO
WHERE DEPTNO ='D11')WITH NO DATA
SQL University.net courses meet the most demanding needs of the business world for advanced education
in a cost-effective manner. SQL University.net courses are available immediately for IT professionals
and can be taken without disruption of your workplace schedule or processes.
Compared to traditional travel-based training, SQL University.net saves time and valuable corporate
resources, allowing companies to do more with less. That's our mission, and that's what we deliver.