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

copy sql 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 :: table information in sql server 
Sql :: add primary key to existing table sql 
Sql :: grant all privileges mysql 8.0.21 
Sql :: mysql find foreign key references 
Sql :: oracle nls session 
Sql :: edate dax 
Sql :: get a list of table names and field names from SQL 
Sql :: display users in mysql 
Sql :: check mysql version phpmyadmin 
Sql :: sql list users and roles 
Sql :: ddl materialized view 
Sql :: oracle apex who is connected 
Sql :: mysql get character set 
Sql :: mysql trigger after update 
Sql :: default password of mysql 
Sql :: how to count null values in mysql 
Sql :: firebase bigquery cloud message 
Sql :: drop primary key 
Sql :: create row number in sql 
Sql :: get first 3 letter of department name in sql 
Sql :: postgres alter table add column with default value 
Sql :: return insert results in POSTGRESQL 
Sql :: alter table add column with default value 
Sql :: oracle grant select on schema 
Sql :: sql server convert string to date 
Sql :: can you use a where clause for a child query 
Sql :: mysql select column where has non int values 
Sql :: date less than current date sql 
Sql :: oracle undo usage 
Sql :: how to use a database to see tables mysql 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =