Search
 
SCRIPT & CODE EXAMPLE
 

SQL

copy postgres table from one schema into another

create table schema2.the_table (like schema1.the_table including all);
insert into schema2.the_table
select * 
from schema1.the_table;
Comment

copy table postgres

CREATE TABLE new_table AS 
SELECT
*
FROM
    existing_table
WHERE
    condition;
Comment

postgres copy table

Syntax:
CREATE TABLE new_table AS 
TABLE existing_table;
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql set password for user 
Sql :: trouver doublons sql 
Sql :: backup a table in sql 
Sql :: sql count null 
Sql :: postgres cast as decimal 
Sql :: generate sequence number in sql server 
Sql :: postgres float to int 
Sql :: sql upsert 
Sql :: t-sql merge example 
Sql :: declare variables sql 
Sql :: postgresql add leading zeros 
Sql :: mysql timediff 
Sql :: mysql drop database 
Sql :: get all columns from table sql 
Sql :: how to export only procedures mysql 
Sql :: select last row mysql 
Sql :: create or replace view postgress 
Sql :: sql pagination offset 
Sql :: java sql timestamp now 
Sql :: install mysql 5.7 
Sql :: t-sql drop function if exists 
Sql :: how to check table lock 
Sql :: spring data.sql table not found 
Sql :: postgresql concatenate multiple rows into one row 
Sql :: incompatible sql_mode=only_full_group_by 
Sql :: mssql check if date is greater than today 
Sql :: mariadb json select 
Sql :: sql row number in result set 
Sql :: sql extract from mail 
Sql :: postgresql delete multiple rows 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =