1 00:00:00,480 --> 00:00:10,650 Hello and welcome to this vigil on creating a sequence sequence is there an automatic rule numbering 2 00:00:11,220 --> 00:00:15,690 system that can help improve the performance. 3 00:00:15,690 --> 00:00:17,240 True kashin. 4 00:00:17,670 --> 00:00:21,480 So we are going to create a sequence. 5 00:00:21,690 --> 00:00:29,100 So I've got to add for a quote edit orpen will be created in our sequence in here the sequence will 6 00:00:29,100 --> 00:00:38,820 be helpful later when we try to populate the table we created so we will come in handy soon to create 7 00:00:38,910 --> 00:00:40,170 a sequence. 8 00:00:40,170 --> 00:00:46,880 You begin by typing in the word create sequence. 9 00:00:54,580 --> 00:00:57,790 Followed by these schema. 10 00:00:57,910 --> 00:01:02,190 And the name of the sequence. 11 00:01:10,300 --> 00:01:19,800 It is always good practice to name your sequence as close as possible to the table you're trying to 12 00:01:19,800 --> 00:01:21,730 apply the sequence to. 13 00:01:22,050 --> 00:01:27,240 So in this case one this requires two relate to the destination table. 14 00:01:27,600 --> 00:01:30,300 So our IT destination 15 00:01:33,330 --> 00:01:38,060 on the score is the queue. 16 00:01:39,210 --> 00:01:48,210 So that's the name of the sequence and the sequence takes some values he needs to tell the sequence 17 00:01:48,600 --> 00:01:50,330 what number to start with. 18 00:01:50,370 --> 00:01:57,160 You do that with a start and give it a value giving the value of one. 19 00:01:57,210 --> 00:01:58,830 I wanted to start with one. 20 00:01:58,980 --> 00:02:02,130 Next you need to set minimum value. 21 00:02:02,130 --> 00:02:04,810 You do that with the main vowel mean. 22 00:02:08,550 --> 00:02:11,000 I'll said that to one. 23 00:02:11,460 --> 00:02:14,400 Next you need to set a maximum value 24 00:02:18,240 --> 00:02:26,670 and you can make this several nines just 9 9 and lined up all as many as possible your keyboard. 25 00:02:26,910 --> 00:02:31,440 Next we need to set an increment increment by. 26 00:02:31,440 --> 00:02:36,720 So how do we want the numbering to increase. 27 00:02:36,930 --> 00:02:39,810 So we do that with increment 28 00:02:42,450 --> 00:02:43,140 by. 29 00:02:43,170 --> 00:02:45,030 I want it to increase by 1. 30 00:02:45,030 --> 00:02:48,750 So you specify that need to specify it. 31 00:02:48,750 --> 00:02:50,640 Cash. 32 00:02:51,810 --> 00:02:52,540 Cash well. 33 00:02:52,590 --> 00:02:53,460 CASH dollars. 34 00:02:53,460 --> 00:03:01,170 That is cash like a storage mechanism so you can specify how many numbers how many numbers the account 35 00:03:01,200 --> 00:03:05,890 can hold at a time so it makes it easy to retrieve. 36 00:03:05,950 --> 00:03:11,970 If you have certain numbers in cash there is a disadvantage to this as well. 37 00:03:11,970 --> 00:03:19,770 In that if you have a power cut you lose all or the number or the or the date or the numbering you've 38 00:03:19,770 --> 00:03:22,120 got inside the cash. 39 00:03:22,230 --> 00:03:28,460 On the positive side if you have numbers cashed it makes it easy to retrieve. 40 00:03:28,470 --> 00:03:31,270 And this will improve the performance. 41 00:03:31,310 --> 00:03:37,440 But on the flipside if you got a power cord you lose what you've stored so and then set the cash to 42 00:03:38,000 --> 00:03:44,460 Tier 1 it is just stored 30 and then up end that with a semicolon semicolon. 43 00:03:44,610 --> 00:03:52,640 Always terminate your statements rights allow that the sequence has been created. 44 00:03:52,650 --> 00:03:58,290 I need to execute this call execute. 45 00:03:58,400 --> 00:04:02,940 You see there is a sequence created sequence created. 46 00:04:02,950 --> 00:04:07,410 Once you've executed you also have to commit. 47 00:04:07,590 --> 00:04:10,190 Once you commit you can't roll back. 48 00:04:10,220 --> 00:04:14,830 At this stage I can decide I don't want no sequence so go ahead. 49 00:04:14,980 --> 00:04:22,680 Just roll it back using the roll back command on the editor saw was some sure. 50 00:04:22,700 --> 00:04:25,780 I want this to stay in the database. 51 00:04:25,950 --> 00:04:26,850 I have it. 52 00:04:26,920 --> 00:04:29,290 Comet it's now being it. 53 00:04:29,290 --> 00:04:33,340 It tells you the comet executer blah blah blah. 54 00:04:33,460 --> 00:04:36,670 All right so we now have a sequence. 55 00:04:36,750 --> 00:04:41,420 So your we went through creating a sequence. 56 00:04:41,520 --> 00:04:46,040 Sequences are good for automatic number 3. 57 00:04:46,380 --> 00:04:48,120 Thank you so much for watching. 58 00:04:48,120 --> 00:04:51,800 I hope this feed your has been helpful. 59 00:04:52,020 --> 00:04:53,640 Hope to see you again soon. 60 00:04:53,640 --> 00:04:55,230 You have a good day. 61 00:04:55,230 --> 00:04:56,070 Bye for now.