Search
 
SCRIPT & CODE EXAMPLE
 

SQL

copy table oracle

CREATE TABLE New_Table_name AS SELECT * FROM Existing_table_Name; 
Comment

oracle copy table

-- Copy a table (datas, columns and storage parameters)
CREATE TABLE my_new_table AS SELECT * FROM my_source_table;
-- Use NOLOGGING, and PARALLEL if allowed for faster copy
CREATE TABLE my_new_table
    PARALLEL 10 NOLOGGING
AS
SELECT /*+ parallel(10) */ * FROM my_source_table;
-- To create an empty table:
CREATE TABLE my_new_table AS SELECT * FROM my_source_table
	WHERE rownum = 0;
Comment

oracle sql copy table without data

-- Copy datas and structure:
CREATE TABLE new_table AS SELECT * FROM my_table;
-- Copy structure only:
CREATE TABLE new_table AS SELECT * FROM my_table WHERE 1=0;
Comment

PREVIOUS NEXT
Code Example
Sql :: check database name oracle 
Sql :: pl sql output 
Sql :: oracle show grants on table 
Sql :: join first name and last name sql 
Sql :: show tables sql server 
Sql :: commentaire table oracle 
Sql :: mariadb select multiple rows into one column 
Sql :: database url postgres 
Sql :: alter table column size oracle 
Sql :: Mysql Case sum 
Sql :: start mysql server linux terminal 
Sql :: sql query to get column names and data types in sql server 
Sql :: set mysql mode global query 
Sql :: his is incompatible with sql_mode=only_full_group_by 
Sql :: drop table if exists in postgres 
Sql :: oracle find text in functions 
Sql :: mysql text to decimal 
Sql :: oracle time 24h 
Sql :: sql getdate date only 
Sql :: drop a row in mysql 
Sql :: cast to date bigquery 
Sql :: how to add a index to live table mysql 
Sql :: sqlserver add column to table 
Sql :: Sql query to force the database to be drop 
Sql :: Error Code: 1055. Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 
Sql :: what is meant by trigger in dbms 
Sql :: mysql check if string contains comma separated 
Sql :: Odoo Service is not coming up with postgresql read replica (slave) 
Sql :: error code 1292 mysql workbench 
Sql :: set permanent SET GLOBAL sql_mode ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =