Insert Data into the Table with Management Studio

Microsoft SQL Server 2017 for Everyone Manipulating Tables and Data
4 minutes
Share the link to this page
You need to have access to the item to view this lesson.
One-time Fee
List Price:  $99.99
You save:  $30
List Price:  €91.90
You save:  €27.57
List Price:  £78.70
You save:  £23.61
List Price:  CA$136.14
You save:  CA$40.84
List Price:  A$149.21
You save:  A$44.76
List Price:  S$134.58
You save:  S$40.38
List Price:  HK$780.18
You save:  HK$234.07
CHF 63.62
List Price:  CHF 90.89
You save:  CHF 27.27
NOK kr751.73
List Price:  NOK kr1,073.95
You save:  NOK kr322.21
DKK kr480.45
List Price:  DKK kr686.39
You save:  DKK kr205.93
List Price:  NZ$162.99
You save:  NZ$48.90
List Price:  د.إ367.26
You save:  د.إ110.19
List Price:  ৳11,707.96
You save:  ৳3,512.74
List Price:  ₹8,329.22
You save:  ₹2,499.01
List Price:  RM468.70
You save:  RM140.62
List Price:  ₦146,985.30
You save:  ₦44,100
List Price:  ₨27,706.17
You save:  ₨8,312.68
List Price:  ฿3,624.43
You save:  ฿1,087.43
List Price:  ₺3,224.01
You save:  ₺967.30
List Price:  B$510.40
You save:  B$153.13
List Price:  R1,807.25
You save:  R542.23
List Price:  Лв179.86
You save:  Лв53.96
List Price:  ₩135,425.45
You save:  ₩40,631.70
List Price:  ₪370.41
You save:  ₪111.13
List Price:  ₱5,770.97
You save:  ₱1,731.46
List Price:  ¥15,565.94
You save:  ¥4,670.25
List Price:  MX$1,660.69
You save:  MX$498.25
List Price:  QR362.75
You save:  QR108.83
List Price:  P1,354.73
You save:  P406.46
List Price:  KSh13,098.69
You save:  KSh3,930
List Price:  E£4,690.53
You save:  E£1,407.30
List Price:  ብር5,727.42
You save:  ብር1,718.40
List Price:  Kz84,733.22
You save:  Kz25,422.51
List Price:  CLP$89,440.82
You save:  CLP$26,834.93
List Price:  CN¥722.24
You save:  CN¥216.69
List Price:  RD$5,826.59
You save:  RD$1,748.15
List Price:  DA13,436.03
You save:  DA4,031.21
List Price:  FJ$222.79
You save:  FJ$66.84
List Price:  Q776.81
You save:  Q233.06
List Price:  GY$20,917.88
You save:  GY$6,275.99
ISK kr9,678.91
List Price:  ISK kr13,827.61
You save:  ISK kr4,148.70
List Price:  DH990.33
You save:  DH297.13
List Price:  L1,760
You save:  L528.05
List Price:  ден5,654.52
You save:  ден1,696.52
List Price:  MOP$803.51
You save:  MOP$241.07
List Price:  N$1,819.78
You save:  N$545.99
List Price:  C$3,674.63
You save:  C$1,102.50
List Price:  रु13,329.38
You save:  रु3,999.21
List Price:  S/371.45
You save:  S/111.44
List Price:  K388.01
You save:  K116.41
List Price:  SAR374.96
You save:  SAR112.50
List Price:  ZK2,538.86
You save:  ZK761.73
List Price:  L457.57
You save:  L137.28
List Price:  Kč2,271.57
You save:  Kč681.54
List Price:  Ft35,609.88
You save:  Ft10,684.03
SEK kr750.08
List Price:  SEK kr1,071.59
You save:  SEK kr321.50
List Price:  ARS$88,666.13
You save:  ARS$26,602.50
List Price:  Bs690.83
You save:  Bs207.27
List Price:  COP$380,678.73
You save:  COP$114,215.04
List Price:  ₡51,169.76
You save:  ₡15,352.46
List Price:  L2,462.78
You save:  L738.91
List Price:  ₲749,130.70
You save:  ₲224,761.68
List Price:  $U3,853.49
You save:  $U1,156.16
List Price:  zł392.01
You save:  zł117.61
Already have an account? Log In


Last video, we did what we usually do, we wrote SQL scripts to accomplish tasks. Now in this video, we'll be looking at how we can use the power of our SQL Server Management Studio to do the same functionality without us needing to write a line of code or SQL. So we are back to our similar screen, we have no script code here. But then we do have you know Object Explorer or table so we can just right click our table, and then we can see edit top 200 rows. Now when we click that, we see a tabular format, like what we were describing from the earlier parts of these videos, showing us all of the data and the respective columns that these data points are in. So we see one we didn't put any IDs into the system, or pontil.

No, and we see that we have IDs going on column D, we skipped tool, because remember, we tried to insert a second record and it had an arrow. So the auto increment or said or attempted second record was there, it failed. But two is no longer a valid number to use in uniquely identifying anything. So it skipped two, but then each other successful one, but its own ID value. So that is the point of using that identity attributes. Secondly, you can see that each last name and first name went in so it really didn't matter the order that we put the code, we put the columns and then put the data in the fact is the data should have lined up with each column and the date of births.

And as I expand this, and you see that because we're using date time, even though we didn't specify all we did was specify the year month and day, it still appends a time value on it. So you actually use this time, date time value. If you need to keep track of time that exact point in time something happened, then the time is very ideal for that. And then we have the enrollment, which is similar, but then we see that we have some with values, and some with notes. So once again, because we made it a nullable column, then we see that we were able to insert some records with no value and insert some with values. Now, you may have noticed that I was actually able to click in the column and it became editable.

And if you took note of that, then that's excellent. When you are in this mode, it literally said edit top 200. So it ran a small query, and it got the top 200 rows and it gave us a forum where we can actually change or add new ones if we want. So first we're going to add new rules. So this new Students, I'm going to use my last name, and I have a friend called Artemis. And then that person's date of birth is 2001, the ninth month, the fifth day.

And I'm going to actually put in an invalid value here for the date of birth. So that's the 15th. Day, we all know, at least in our Western calendar, there's no 15th day, and I'm going to press enter, which will trigger the same, and then we see here that we get an error message, the value in this cell is not valid. So it's telling us go back to the drawing board, there's something wrong, so I'll just edit it. And I'll just take off that zero out of those, press Enter. And you'll see that it just falls in line those red icons disappear.

And we have a 12th record Williams article. So you can actually use this view to just put in your records. If it is that you don't want to write the script. Of course the script is more fluid Because you can actually save the script and share it and execute it on another machine as well. Whereas this one it, you have to be on that particular machine in that particular database to fill it out. So this is more manual for me, the script is more automated because I can always tweak that and share it.

So that's how you will both inserting data in your data tables using the editor. You can go ahead and insert more records and you can experiment with inserting more records in the courses table.

Sign Up


Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.