Search
 
SCRIPT & CODE EXAMPLE
 

SQL

copy table sql server

-- Use SELECT ... INTO:
SELECT * INTO my_table_1 FROM my_table;
-- Structure only:
SELECT * INTO my_table_1 FROM my_table WHERE 1 <> 1;
Comment

sql copy table structure

CREATE TABLE newtableName LIKE anotherTable;
Comment

sql copy table

INSERT INTO newTable
SELECT * FROM oldTable
Comment

copy table in sql

CREATE TABLE employees_copy
 AS 
 SELECT first_name, last_name, email FROM employees WHERE 1=0;
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql max() 
Sql :: SQL Server OPENQUERY WITH result SETS 
Sql :: sql and 
Sql :: oracle drop type if exists 
Sql :: oracle drop type 
Sql :: update row postgres 
Sql :: how to update values in sql 
Sql :: mssql remove duplicate rows 
Sql :: select indexes postgres 
Sql :: sql count(*) 
Sql :: how to select multiple columns from different tables in mysql 
Sql :: coalesce function in sql server 
Sql :: sql create cluster index 
Sql :: mysql workbench format date 
Sql :: add sqlite3 in lumen 
Sql :: devilbox mysqldump 
Sql :: check if table is Temporal 
Sql :: sql store procedure 
Sql :: logical operators in sql 
Sql :: in in sql 
Sql :: uuid sqlalcomany 
Sql :: cql insert 
Sql :: postgresql array to rows 
Sql :: drop databse 
Sql :: mysql group rows with same value 
Sql :: mysql calcular idade 
Sql :: oracle job schedules 
Sql :: sql date between one week 
Sql :: duplicate row mysql 
Sql :: sql transfer table in other 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =