1
00:00:01,740 --> 00:00:07,110
Hello and welcome to this video and this video we are going to discuss about the logical operators,

2
00:00:07,110 --> 00:00:12,870
which we have discussed in the previous video, Logical Operator End and or.

3
00:00:14,160 --> 00:00:21,300
Also, we are going to practically prove the truth to both, which we have seen in the previous video.

4
00:00:21,630 --> 00:00:28,710
I am going to use the same table which I have created previously, that they blamed employee stablemate

5
00:00:28,710 --> 00:00:35,410
consist of three different records and three columns, employed employee name and employee department.

6
00:00:35,850 --> 00:00:42,840
I'm going to go into the school tab wherein the automated generated query that they select are from

7
00:00:42,840 --> 00:00:44,740
employees is already there.

8
00:00:45,180 --> 00:00:49,970
So I am going to create some conditional statements.

9
00:00:49,980 --> 00:00:54,090
I'm going to use employee name equals Herry.

10
00:00:56,030 --> 00:01:03,380
To make this statement true, as I said previously, that logical operators are being used between two

11
00:01:03,380 --> 00:01:05,240
different conditional statements.

12
00:01:05,240 --> 00:01:15,410
So the first statement is that clause employee Namik will do very amusing and operator here and taking

13
00:01:15,410 --> 00:01:21,370
another column that is employee department and writing it equal to EITE.

14
00:01:21,800 --> 00:01:22,670
That means.

15
00:01:24,020 --> 00:01:32,480
McQuary says that select all the records from the employee where employee Niemiec was an employee department

16
00:01:32,480 --> 00:01:33,710
equals I.T..

17
00:01:35,970 --> 00:01:44,160
So according to the employee stable statement, that is employee name equals 80 and statement B, that

18
00:01:44,160 --> 00:01:51,660
is employee department equals I.T. Both these statements are true, according to the employee stable.

19
00:01:51,690 --> 00:01:56,690
So I am getting the output of Harry as an output.

20
00:01:56,700 --> 00:01:58,440
You can see down with your.

21
00:02:00,400 --> 00:02:07,970
Now I go back to school or you can I get in line or regulate itself, so I am changing the department,

22
00:02:07,990 --> 00:02:14,470
which, according to the employee, stable herie belongs to I.T. department, not H.R. departments.

23
00:02:14,490 --> 00:02:21,130
So I am not getting any results, which simply means that statement is true.

24
00:02:21,130 --> 00:02:23,980
But Statement B makes it false.

25
00:02:23,980 --> 00:02:30,970
So the output of true and false becomes false, according to the true table discussed.

26
00:02:30,970 --> 00:02:38,650
As you can see over here, if anyone of this statement is false, the output is always going to be false.

27
00:02:42,110 --> 00:02:46,010
Now, I am going to change this again, go to Escuela.

28
00:02:48,510 --> 00:02:55,620
Just to see how the tables looks like and what is the data inside it, so here you can see that Harry

29
00:02:55,620 --> 00:02:59,090
belongs to I.T. department, NorTech, our department.

30
00:02:59,520 --> 00:03:02,640
So that is why when I put department.

31
00:03:04,610 --> 00:03:12,740
So when I put employee department equals I.T., I get the result, but when I put Heddy Department H.R.,

32
00:03:12,740 --> 00:03:14,370
I am not getting any results.

33
00:03:14,870 --> 00:03:22,160
So now I'm trying some other condition is employee ID equals to an employee names name equals.

34
00:03:23,260 --> 00:03:23,830
Peter.

35
00:03:26,150 --> 00:03:32,360
This statement is, again, false because employee I.D. three is better not to, so I am not going to

36
00:03:32,360 --> 00:03:34,230
get any result over here.

37
00:03:34,850 --> 00:03:43,100
So now let's make this statement true so that to verify that and operate over an operator will work

38
00:03:43,100 --> 00:03:45,830
only if both the statements are true.

39
00:03:45,980 --> 00:03:48,020
It is not going to work either.

40
00:03:48,020 --> 00:03:49,780
One of the statement is false.

41
00:03:49,790 --> 00:03:53,580
If both those statements are false, we are not going to get any results.

42
00:03:54,230 --> 00:03:56,930
So this is all and operator behaves.

43
00:03:58,060 --> 00:04:05,520
Let's test for our operator for the same conditions, employee ID equals to employee name equals Eddie.

44
00:04:05,890 --> 00:04:08,030
We are getting exact same result.

45
00:04:08,050 --> 00:04:15,250
That means if both the conditions are true, we are getting the output is true according to that table

46
00:04:15,250 --> 00:04:21,670
over your if both the conditions are true, we are always going to get the result is true according

47
00:04:21,670 --> 00:04:27,160
to the all table, which is exactly similar to end to table.

48
00:04:28,340 --> 00:04:33,800
But where the difference is, so the difference is a real.

49
00:04:38,940 --> 00:04:45,810
Let's dig an employee I.D., which not at all exist in the table that is employed equals for an employee

50
00:04:45,810 --> 00:04:49,560
name equals 80 and let's see what the output is.

51
00:04:49,590 --> 00:04:51,780
So, yes, we are getting dorper.

52
00:04:52,140 --> 00:04:57,630
That means if anyone of the condition is true, we are getting the result.

53
00:04:57,660 --> 00:05:01,650
This is how all should behave according to the truth table.

54
00:05:01,650 --> 00:05:06,450
And it is behaving, as you can see in the practical overyear.

55
00:05:08,830 --> 00:05:15,610
If I change this to end, I am not going to get any it is all because and says that I will not allow

56
00:05:15,610 --> 00:05:23,010
if anyone of this statement is false, but says that I will allow if anyone of this statement is true,

57
00:05:23,440 --> 00:05:25,270
this is where the difference is.

58
00:05:25,600 --> 00:05:29,970
If both statements are true, then the output is true.

59
00:05:29,980 --> 00:05:34,630
If anyone of this statement is true, then the output is true according to all.

60
00:05:35,050 --> 00:05:37,600
So this is where the major difference is.

61
00:05:41,990 --> 00:05:48,290
Let's change this to Oregon and see, yes, we are getting the results of one statement is true.

62
00:05:48,680 --> 00:05:55,790
So let's try to make this again, both the statements through employee edition and name equals John.

63
00:05:55,790 --> 00:05:59,560
So, yes, we are getting the result as expected.

64
00:05:59,990 --> 00:06:05,930
So I hope you guys understood about the difference between and and or logical operators.

65
00:06:06,260 --> 00:06:07,550
That's it for this video.

66
00:06:07,580 --> 00:06:08,570
Thank you so much.
