1 00:00:00,300 --> 00:00:01,750 Hello and welcome. 2 00:00:01,770 --> 00:00:12,660 In this vigil we will be using the Eskew update to date existing data in a database table. 3 00:00:12,780 --> 00:00:23,060 The Escuela update is used to change a set of data that is already present within the database table. 4 00:00:23,110 --> 00:00:32,520 So if you have you working for a corporation and you need to make a huge update on say an e-mail address 5 00:00:32,520 --> 00:00:38,220 or something you can imagine if you got like 20 tiles on or so rockwoods to a date. 6 00:00:38,490 --> 00:00:39,740 I ask you a lot. 7 00:00:39,740 --> 00:00:46,160 It can be used to achieve that with very minimum effort. 8 00:00:46,200 --> 00:00:58,920 I have got to add for a quote utopian I am going to date a record from the destination table that we 9 00:00:58,980 --> 00:01:02,300 created in a few years ago. 10 00:01:02,580 --> 00:01:12,330 So to date records record you begin with the data keyword Google update. 11 00:01:13,350 --> 00:01:18,830 So you start with a keyword update followed by the name of the table. 12 00:01:18,960 --> 00:01:23,170 You want one day to take place in its destination. 13 00:01:23,220 --> 00:01:29,060 Last name of my table then use to set. 14 00:01:29,850 --> 00:01:37,350 So this set indicates the new value you want to give the data you are dating. 15 00:01:37,410 --> 00:01:42,850 So I'm going to set it up you need to give it a value with it equals two sizes too. 16 00:01:42,900 --> 00:01:48,560 It was close just set in the value so you need to. 17 00:01:48,600 --> 00:01:51,130 Yes pacify the data. 18 00:01:51,170 --> 00:01:53,730 So I want to set the country 19 00:01:57,240 --> 00:02:04,170 to equal to you yes. 20 00:02:07,310 --> 00:02:11,870 Where you must specify way. 21 00:02:12,140 --> 00:02:19,690 If you don't use the WHERE clause to act as a filter it will update all the records on that table. 22 00:02:19,700 --> 00:02:25,610 It's very important to use their where CLOs cause the WHERE clause as a filter. 23 00:02:25,630 --> 00:02:32,270 I will only update the records you have specified So where country 24 00:02:36,740 --> 00:02:38,680 he was to. 25 00:02:41,750 --> 00:02:43,170 You. 26 00:02:43,910 --> 00:02:49,160 Yes he saw what I'm going to do wherever I have. 27 00:02:49,160 --> 00:02:53,590 Quite the contrary cord web. 28 00:02:53,600 --> 00:02:56,300 What a country call you like USC. 29 00:02:56,380 --> 00:02:59,560 Win or date it would United States. 30 00:02:59,570 --> 00:03:02,870 So don't forget your quotes. 31 00:03:02,870 --> 00:03:10,940 If you are using strings always place your text in between quotes. 32 00:03:10,940 --> 00:03:15,860 So this is the odd day steepen of date table destination. 33 00:03:16,100 --> 00:03:17,350 This is a new value. 34 00:03:17,360 --> 00:03:25,880 You set the new value with this set keywords some will have set the contrary column as a column column 35 00:03:25,880 --> 00:03:34,120 country and destination table and when set that country to you was to the new value of United States. 36 00:03:34,120 --> 00:03:37,870 I now use your where clause to act as a filter. 37 00:03:38,120 --> 00:03:39,620 She don't use a word clause. 38 00:03:39,680 --> 00:03:43,470 It will date everything from that table so be careful. 39 00:03:43,610 --> 00:03:46,520 So the where clause acts as a filter. 40 00:03:46,520 --> 00:03:53,150 So where the country name is equals to USC to change that to United States. 41 00:03:53,300 --> 00:03:57,840 So let's look at B records the way it is at the moment to a select. 42 00:04:00,750 --> 00:04:06,130 Start from destination. 43 00:04:07,790 --> 00:04:12,390 Let's look at the table the way it is at the moment. 44 00:04:15,670 --> 00:04:17,950 So I run that. 45 00:04:18,160 --> 00:04:20,660 All right so this is the current data. 46 00:04:20,920 --> 00:04:24,290 So I've got one USA there. 47 00:04:25,360 --> 00:04:25,810 Okay. 48 00:04:25,810 --> 00:04:26,890 I've got one USA. 49 00:04:26,900 --> 00:04:35,680 So what this query is doing is looking for anywhere where the countries you see it to day that to the 50 00:04:35,700 --> 00:04:37,340 United States. 51 00:04:37,350 --> 00:04:44,770 So to execute this query should give me Chichis this to United States. 52 00:04:44,770 --> 00:04:46,030 Let's do that. 53 00:04:46,030 --> 00:04:54,040 Go there and then go on day to see that one row updated one row of data some data. 54 00:04:54,280 --> 00:05:01,270 So they need to commit to it where you are data records especially if you're dealing with large records 55 00:05:02,180 --> 00:05:09,700 ones you've got data that you can always check new value but you can still roll it back if you're not 56 00:05:09,700 --> 00:05:10,360 sure. 57 00:05:10,600 --> 00:05:18,100 So but once you are sure then commit was you commit the information stays permanent. 58 00:05:18,100 --> 00:05:22,010 So let me run this again. 59 00:05:22,270 --> 00:05:25,420 You see that is now changed to United States. 60 00:05:25,480 --> 00:05:30,040 So wherever it was you see some data added to United States. 61 00:05:30,200 --> 00:05:36,910 Imagine the four have thousands of beath to update this query would have done it in six months. 62 00:05:36,910 --> 00:05:42,010 So that's the power of this secure hobday command. 63 00:05:42,010 --> 00:05:53,160 In this video we use the excuse l r d command to date a record from a database table. 64 00:05:53,520 --> 00:05:58,010 I all the information in this futu has been helpful. 65 00:05:58,090 --> 00:06:01,230 Thank you so much for your time in Washington. 66 00:06:01,240 --> 00:06:02,580 Take care. 67 00:06:02,590 --> 00:06:03,510 Bye for now. 68 00:06:03,520 --> 00:06:04,370 You have a good day.