Search
 
SCRIPT & CODE EXAMPLE
 

SQL

into sql

#The SELECT INTO statement selects data from one table and inserts it into a different table. 
#The SELECT INTO statement is most often used to create backup copies of tables. 
syntax->SELECT *
INTO new_table_name [IN externaldatabase]
FROM old_tablename 
///example///
SELECT *
INTO Persons_Backup
FROM Persons 
Comment

into in sql

-- INTO copies specified columns into a new table
SELECT *
INTO newtable [IN externaldb]
FROM oldtable
WHERE condition;

SELECT column1, column2, column3
INTO newtable [IN externaldb]
FROM oldtable
WHERE condition;

Eg: SELECT * INTO CustomersBackup
	FROM Customers;
    
    SELECT * INTO CustomersBackup IN 'Backup.mdb'
	FROM Customers;
    
    SELECT CustomerName, ContactName INTO CustomersBackup2017
	FROM Customers;
Comment

PREVIOUS NEXT
Code Example
Sql :: to_char oracle 
Sql :: how to find unique element in sql 
Sql :: postgresql procedure example 
Sql :: mariadb cast to int 
Sql :: sql pass table name as variable 
Sql :: sql delete duplicate rows 
Sql :: rollback in sql 
Sql :: psql no such file or directory 
Sql :: postgres default value 
Sql :: show details of table postgres 
Sql :: sql find all different values in column 
Sql :: how to create a table structure from another table in mysql 
Sql :: install mysql for fedora 34 
Sql :: how to truncate foreign key constraint table 
Sql :: mssql-cli usage 
Sql :: timestamp difference sql 
Sql :: if null put 0 sql 
Sql :: using SQL in rails migration 
Sql :: what is intersect in sql 
Sql :: update value sql 
Sql :: how to casting data types in postgresql 
Sql :: mysql find db contarint 
Sql :: set mysql password 
Sql :: EnvironmentError: mysql_config not found 
Sql :: postgresql create table many-to-many 
Sql :: how to get max salary in each department in sql 
Sql :: export mysql table to file 
Sql :: sql set data from a select query to a temp table and insert 
Sql :: how to use query in nosql 
Sql :: sql get month 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =