SQL And, OR, not operators

4 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€42.61
List Price:  €59.66
You save:  €17.04
£36.73
List Price:  £51.42
You save:  £14.69
CA$68.37
List Price:  CA$95.73
You save:  CA$27.35
A$76.20
List Price:  A$106.69
You save:  A$30.48
S$63.93
List Price:  S$89.51
You save:  S$25.57
HK$392.42
List Price:  HK$549.41
You save:  HK$156.99
CHF 39.70
List Price:  CHF 55.59
You save:  CHF 15.88
NOK kr502.70
List Price:  NOK kr703.83
You save:  NOK kr201.12
DKK kr317.94
List Price:  DKK kr445.15
You save:  DKK kr127.20
NZ$83.04
List Price:  NZ$116.27
You save:  NZ$33.22
د.إ183.61
List Price:  د.إ257.07
You save:  د.إ73.46
৳6,072.59
List Price:  ৳8,502.11
You save:  ৳2,429.52
₹4,281.85
List Price:  ₹5,994.93
You save:  ₹1,713.08
RM212.33
List Price:  RM297.28
You save:  RM84.95
₦76,352.72
List Price:  ₦106,899.92
You save:  ₦30,547.20
₨14,222.15
List Price:  ₨19,912.15
You save:  ₨5,690
฿1,628.37
List Price:  ฿2,279.85
You save:  ฿651.47
₺2,002.91
List Price:  ₺2,804.24
You save:  ₺801.32
B$279.22
List Price:  B$390.94
You save:  B$111.71
R886.13
List Price:  R1,240.65
You save:  R354.52
Лв83.35
List Price:  Лв116.70
You save:  Лв33.34
₩68,535.95
List Price:  ₩95,955.81
You save:  ₩27,419.86
₪165.35
List Price:  ₪231.51
You save:  ₪66.15
₱2,824.42
List Price:  ₱3,954.42
You save:  ₱1,129.99
¥7,307.53
List Price:  ¥10,231.13
You save:  ¥2,923.60
MX$930.58
List Price:  MX$1,302.88
You save:  MX$372.30
QR181.64
List Price:  QR254.31
You save:  QR72.67
P665.57
List Price:  P931.86
You save:  P266.28
KSh6,458.70
List Price:  KSh9,042.70
You save:  KSh2,584
E£2,475.42
List Price:  E£3,465.79
You save:  E£990.36
ብር6,912.13
List Price:  ብር9,677.54
You save:  ብር2,765.40
Kz45,588.63
List Price:  Kz63,827.73
You save:  Kz18,239.10
CLP$47,462.50
List Price:  CLP$66,451.30
You save:  CLP$18,988.80
CN¥358.67
List Price:  CN¥502.17
You save:  CN¥143.49
RD$2,987.17
List Price:  RD$4,182.28
You save:  RD$1,195.11
DA6,479.90
List Price:  DA9,072.38
You save:  DA2,592.48
FJ$112.11
List Price:  FJ$156.97
You save:  FJ$44.85
Q384.18
List Price:  Q537.88
You save:  Q153.70
GY$10,453.25
List Price:  GY$14,635.39
You save:  GY$4,182.13
ISK kr6,111.27
List Price:  ISK kr8,556.27
You save:  ISK kr2,445
DH449.91
List Price:  DH629.91
You save:  DH180
L845.85
List Price:  L1,184.27
You save:  L338.41
ден2,622.19
List Price:  ден3,671.28
You save:  ден1,049.08
MOP$404.17
List Price:  MOP$565.87
You save:  MOP$161.70
N$887.95
List Price:  N$1,243.20
You save:  N$355.25
C$1,838.44
List Price:  C$2,573.96
You save:  C$735.52
रु6,827.21
List Price:  रु9,558.64
You save:  रु2,731.43
S/176.84
List Price:  S/247.60
You save:  S/70.75
K208.97
List Price:  K292.58
You save:  K83.60
SAR187.48
List Price:  SAR262.49
You save:  SAR75
ZK1,211.79
List Price:  ZK1,696.61
You save:  ZK484.81
L216.38
List Price:  L302.95
You save:  L86.57
Kč1,049.94
List Price:  Kč1,470
You save:  Kč420.06
Ft17,012.39
List Price:  Ft23,818.72
You save:  Ft6,806.32
SEK kr474.98
List Price:  SEK kr665.01
You save:  SEK kr190.03
ARS$62,614.44
List Price:  ARS$87,665.23
You save:  ARS$25,050.78
Bs345.39
List Price:  Bs483.58
You save:  Bs138.18
COP$201,769.95
List Price:  COP$282,494.08
You save:  COP$80,724.12
₡25,210.50
List Price:  ₡35,296.71
You save:  ₡10,086.21
L1,302.65
List Price:  L1,823.82
You save:  L521.16
₲387,422.74
List Price:  ₲542,422.84
You save:  ₲155,000.09
$U2,030.76
List Price:  $U2,843.23
You save:  $U812.46
zł181.01
List Price:  zł253.43
You save:  zł72.42
Already have an account? Log In

Transcript

Now, it's time to discuss about the N R and the not operators in SQL. So, if you I hope you are familiar with and or not. So, this is the N or N same thing this is the or or say things and this is a lot or not. So, you know very well if you have condition one condition one and condition two if you have this end or this end between these two conditions, if you return to from here to from here that means, some particular code is executed if you use or or or this one that means, if you return this true or this false, it will automatically execute this statement. If you are using not. That means you are saying if this returns true, make it all because you're using art.

So this is very basic. Consider you have the basic knowledge of these operators. I hope you have. So, now I'm saying that please show me the address from students where the address is this. And if I'm using the end, make sure I'm going to do this. So you can easily I'm seeing an S ID and the S ID s ID equals two One so now I can hit control interest now as you can see, it's not showing any results because because you know very well that I'm saying just a second straight, you know very well that I am filtering the record who has this address so you can see it was the same.

So as you can see this row have three value and this oil value. So that's why there's not receiving any record because you are saying oh please use the where clause, where the address is this fine. This returns to, you are using the are, you are saying that s ID equals one. So as you can see here is the one ID is not available. So that's why and always execute If you return both two positions, this one and this one, okay? Ctrl, enter Ctrl Ctrl F, so you can see it's not returning.

If you're using the art, it will, using the R, it will return the records because this condition is true. So that's why it's retrieving the values from the tables. And why it's receiving this way, because this returns false. But this value returns to so that's why it's also correct. So that's why it's returning this way. Okay, if I'm saying that only show me where not equals to this call F. So as you can see your string the other Okay, so in this way your and or not operators work so it's totally depend upon you how you are creating the logic and what is your need and what is your requirement.

So it's fine. So thanks for watching

Sign Up

Share

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.