SQL SELECT INTO is used to create a table from an existing table by copying the contents of the current table to the new table. The critical point to note here is that the column and data type of column must be the same. SELECT INTO copies data from one table into a new table. SELECT INTO creates a new table located in the default filegroup.

See the following syntax.

Select column(s) 
INTO new_table 
from old_table_name where(condition).

#PARAMETERS

  1. Column(s): Name of the columns which we want to copy.
  2. INTO: This is a keyword that is used to perform the copy operation.
  3. New_table: Name of the new table which will be created.
  4. Old_table_name: Name of the old table from where we are copying.
  5. Where(condition): This is used for imposing conditions into the select statement.

#sql #sql select into #select into

SQL SELECT INTO Example | SELECT INTO In SQL
1.85 GEEK