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 :: oracle add attribute to table 
Sql :: what is subquery in sql 
Sql :: MySQL OR 
Sql :: postgres trim string 
Sql :: find current server name for SSMS 
Sql :: psql invalid command N 
Sql :: attributes of cursor in sql 
Sql :: select only columns that are not empty oracle sql 
Sql :: description query in sql 
Sql :: T-SQL and the WHERE LIKE %Parameter% clause 
Sql :: mysql undo delete 
Sql :: sql select maximum column with other columns returned 
Sql :: android sqlite get rows count 
Sql :: get last inserted primary key 
Sql :: sql day from datetime 
Sql :: sqlite trim 
Sql :: set up mssql in mac m1 
Sql :: t sql return on letters only 
Sql :: what is 1=2 in sql 
Sql :: How to automatically export database to a csv file 
Sql :: mysql dump database tables only 
Sql :: create procedure sql 
Sql :: SELECT SQL LIKE 
Sql :: decimal to integer sql 
Sql :: How to drop table in mysql ? 
Sql :: apex run 404 
Sql :: MySql count occurences more than" 
Sql :: like sql for second letter of the family name 
Sql :: will graphql replace sql 
Sql :: how to save result of sqlite query in a table 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =