Create Table INSERT (CTAS)

Submitted by:Jhon Jhon

Date added:24 June, 2015

Category:PL SQL

Create a table with the results from a SELECT statement.

Tags: select statement , create table

Code Snippet:

CREATE TABLE <table_name> AS <SELECT Statement>;

CREATE TABLE t1 AS
SELECT
store_name,
AVG(quantity) qty
FROM
store join sales using (store_key)
GROUP BY store_name;
 
 

Comments