Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert into certain columns [duplicate]

Tags:

People also ask

How do you insert duplicates in SQL?

Use the context menu on the same table, to get another script: "Script Table as | SELECT To | New Query Window". This will be a totally standard select list, with all your fields listed out. Copy the whole query and paste it in over the VALUES clause in your first query window. This will give you a complete INSERT ...

How do I avoid duplicates in select query?

The go to solution for removing duplicate rows from your result sets is to include the distinct keyword in your select statement. It tells the query engine to remove duplicates to produce a result set in which every row is unique.


Im using SQL Server 2005.

I have a table1 with 3 columns. And table2 with 4 columns.

I want to insert the records from table1 into table2.

But I dont want to insert into column1 from table2.

I want to start inserting from column2 on.

What can i do? Thanks...