SQL Server 2016: Insert Data
You can insert data using a number of methods. You can insert it directly, copy/paste, import, use SQL, or use an external application.
Here, we'll take a quick look at the various methods of inserting data into SQL Server.
-
Direct Input
-
Copy/Paste
First, copy the data from the external source.
Now, switch to SSMS and open the table by using the previous method (i.e. right-click on the table and select Edit Top 200 Rows).
Once the table has opened, right-click in the document window and select Paste.
Sample Data
Copy and paste the following data into the Genres table:
1 Rock 2 Jazz 3 Country 4 Pop 5 Blues 6 Hip Hop 7 Rap 8 Punk SQL Server will ignore the first column, because it's an identity column. So if you already have records in that table, the resulting IDs for the new data will be different to the above.
-
Import Data
-
Use SQL to Insert the Data
-
Website/Application