Snippet Name: SELECT into a table Description: Create a table by SELECTing rows into it from another table or tables. Also see:» TABLE: Using Select Statement With Data » SELECT: Case insensitive search » SELECT: Partition Select » SELECT: Select For Update » SELECT: Using Functions » SELECT: Get DISTINCT or UNIQUE values » SELECT: Get UNIQUE and DISTINCT values » SELECT: Scalar Select » SELECT with HAVING Clause » SELECT with GROUP BY Clause » SELECT with WHERE Clause » SELECT with SAMPLE clause » SELECT placement » SELECT name columns » SELECT » UPDATE: Update from a SELECT statement » Inserting into SELECT statement » INSERT with Select Comment: (none) Language: PL/SQL Highlight Mode: PLSQL Last Modified: March 05th, 2009
Description: Create a table by SELECTing rows into it from another table or tables.
Also see:» TABLE: Using Select Statement With Data » SELECT: Case insensitive search » SELECT: Partition Select » SELECT: Select For Update » SELECT: Using Functions » SELECT: Get DISTINCT or UNIQUE values » SELECT: Get UNIQUE and DISTINCT values » SELECT: Scalar Select » SELECT with HAVING Clause » SELECT with GROUP BY Clause » SELECT with WHERE Clause » SELECT with SAMPLE clause » SELECT placement » SELECT name columns » SELECT » UPDATE: Update from a SELECT statement » Inserting into SELECT statement » INSERT with Select
SELECT <clause> INTO <clause> FROM <clause> WHERE <clause> CREATE TABLE <table_name> AS SELECT <column_name, column_name, ..., <column_name> FROM <table_name>; CREATE TABLE user_list AS SELECT * FROM old_users; SELECT * FROM user_list;