Like inserting single or multiple records at a time, one table data is inserting into another table with limited columns.
Asked
Active
Viewed 927 times
-2
-
3There is only one way: `INSERT` – Apr 11 '18 at 06:07
-
1@a_horse_with_no_name There is also bulk loading. – Tim Biegeleisen Apr 11 '18 at 06:09
-
What about "Edit Top 200 Rows" @a_horse_with_no_name – Swamy Apr 11 '18 at 06:10
-
Thanks @TimBiegeleisen because of u i know the bulk loading – Swamy Apr 11 '18 at 06:15
-
There is no [SQL statement](https://learn.microsoft.com/en-us/sql/t-sql/statements/statements) named `Edit top 200 rows` - anything that a GUI offers (which I assume you are referring to with "Edit top ..") will eventually be carried out using an `INSERT` statement. – Apr 11 '18 at 06:19
-
Whatever it is DML or GUI but need how many approaches we have – Swamy Apr 11 '18 at 06:24
-
As I said: [`INSERT`](https://learn.microsoft.com/en-us/sql/t-sql/statements/insert-transact-sql) is the approach to insert new rows – Apr 11 '18 at 06:30
-
Thank You @a_horse_with_no_name – Swamy Apr 11 '18 at 06:31
-
pls see if this helps - https://msbiskills.com/2015/04/09/different-methods-to-insert-multiple-rows-using-single-insert-keyword/ – Pawan Kumar Apr 11 '18 at 07:29
-
This is what I am looking for thank you @PawanKumar and need from table to table insertion. – Swamy Apr 11 '18 at 07:41
-
Glad to help always :) – Pawan Kumar Apr 11 '18 at 09:02
2 Answers
2
There are (at least) four ways:
INSERT
. Pretty obvious. It supports both single rows and multiple rows supplied as literal values, as well as inserting the result of a query or stored procedure.SELECT .. INTO
inserts the results of a query into a new table.BULK INSERT
. Bulk inserts data from files. It's a little quirky and not very flexible when it comes to parsing files, but if you can get the data to line up it works well enough. Selecting data for bulk insert purposes can also be done withOPENROWSET(BULK, ...)
.INSERT BULK
. This is an internal command that's used under the covers by drivers that use the bulk insert protocol in TDS (the protocol used by SQL Server). You do not issue these commands yourself. UnlikeBULK INSERT
, this is for client-side initiated bulk inserting, for example through theSqlBulkCopy
class in .NET, or SQL Server's ownbcp
tool.
All other interfaces and approaches to inserting data use one of these methods under the covers. Most of these will use plain old INSERT
.

Jeroen Mostert
- 27,176
- 2
- 52
- 85
0
- Bulk Insert https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql
- Insert Transact https://learn.microsoft.com/en-us/sql/t-sql/statements/insert-transact-sql
- Select Insert https://www.w3schools.com/sql/sql_insert_into_select.asp
Hope this will help

Louied
- 119
- 1
- 5