NULL values in SQL

5 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
€46.59
List Price:  €65.24
You save:  €18.64
£39.95
List Price:  £55.93
You save:  £15.98
CA$68.27
List Price:  CA$95.58
You save:  CA$27.31
A$76.51
List Price:  A$107.13
You save:  A$30.61
S$68.03
List Price:  S$95.25
You save:  S$27.21
HK$391.33
List Price:  HK$547.90
You save:  HK$156.56
CHF 45.60
List Price:  CHF 63.85
You save:  CHF 18.24
NOK kr550.06
List Price:  NOK kr770.13
You save:  NOK kr220.06
DKK kr347.49
List Price:  DKK kr486.51
You save:  DKK kr139.02
NZ$84.03
List Price:  NZ$117.65
You save:  NZ$33.61
د.إ183.60
List Price:  د.إ257.06
You save:  د.إ73.45
৳5,484.82
List Price:  ৳7,679.19
You save:  ৳2,194.37
₹4,167.13
List Price:  ₹5,834.32
You save:  ₹1,667.18
RM238.42
List Price:  RM333.81
You save:  RM95.39
₦65,297.93
List Price:  ₦91,422.33
You save:  ₦26,124.40
₨13,918.71
List Price:  ₨19,487.31
You save:  ₨5,568.59
฿1,846.97
List Price:  ฿2,585.90
You save:  ฿738.93
₺1,626.69
List Price:  ₺2,277.50
You save:  ₺650.80
B$257.91
List Price:  B$361.10
You save:  B$103.18
R942.93
List Price:  R1,320.17
You save:  R377.24
Лв91.05
List Price:  Лв127.48
You save:  Лв36.42
₩68,777.09
List Price:  ₩96,293.43
You save:  ₩27,516.34
₪190.37
List Price:  ₪266.53
You save:  ₪76.16
₱2,884.27
List Price:  ₱4,038.21
You save:  ₱1,153.93
¥7,839.25
List Price:  ¥10,975.59
You save:  ¥3,136.33
MX$862.02
List Price:  MX$1,206.90
You save:  MX$344.87
QR182.32
List Price:  QR255.26
You save:  QR72.94
P689.82
List Price:  P965.80
You save:  P275.98
KSh6,748.65
List Price:  KSh9,448.65
You save:  KSh2,700
E£2,394.60
List Price:  E£3,352.63
You save:  E£958.03
ብር2,846.33
List Price:  ብር3,985.10
You save:  ብር1,138.76
Kz41,775.97
List Price:  Kz58,489.70
You save:  Kz16,713.73
CLP$47,415.51
List Price:  CLP$66,385.51
You save:  CLP$18,970
CN¥362.26
List Price:  CN¥507.19
You save:  CN¥144.93
RD$2,936.27
List Price:  RD$4,111.01
You save:  RD$1,174.74
DA6,712.91
List Price:  DA9,398.61
You save:  DA2,685.70
FJ$112.97
List Price:  FJ$158.17
You save:  FJ$45.19
Q388.83
List Price:  Q544.39
You save:  Q155.56
GY$10,456.12
List Price:  GY$14,639.41
You save:  GY$4,183.28
ISK kr6,993.60
List Price:  ISK kr9,791.60
You save:  ISK kr2,798
DH505.76
List Price:  DH708.11
You save:  DH202.34
L888.32
List Price:  L1,243.72
You save:  L355.39
ден2,869.11
List Price:  ден4,016.98
You save:  ден1,147.87
MOP$402.79
List Price:  MOP$563.94
You save:  MOP$161.15
N$957.24
List Price:  N$1,340.22
You save:  N$382.97
C$1,839.29
List Price:  C$2,575.16
You save:  C$735.86
रु6,654.43
List Price:  रु9,316.74
You save:  रु2,662.30
S/186.47
List Price:  S/261.07
You save:  S/74.60
K192.50
List Price:  K269.52
You save:  K77.01
SAR187.49
List Price:  SAR262.50
You save:  SAR75.01
ZK1,315.66
List Price:  ZK1,842.03
You save:  ZK526.37
L231.86
List Price:  L324.63
You save:  L92.76
Kč1,171.86
List Price:  Kč1,640.70
You save:  Kč468.84
Ft18,288.87
List Price:  Ft25,605.88
You save:  Ft7,317.01
SEK kr544.90
List Price:  SEK kr762.91
You save:  SEK kr218
ARS$43,678.56
List Price:  ARS$61,153.48
You save:  ARS$17,474.92
Bs346.09
List Price:  Bs484.56
You save:  Bs138.46
COP$197,009.16
List Price:  COP$275,828.59
You save:  COP$78,819.43
₡25,122.12
List Price:  ₡35,172.98
You save:  ₡10,050.86
L1,233.97
List Price:  L1,727.65
You save:  L493.68
₲371,261.88
List Price:  ₲519,796.34
You save:  ₲148,534.45
$U1,917.12
List Price:  $U2,684.12
You save:  $U767
zł201.38
List Price:  zł281.95
You save:  zł80.57
Already have an account? Log In

Transcript

You know, well that we have successfully inserted the record similar to the structure. And now it's time to talk about the null values. So what is the null value for suppose if you have values which has the null so what is the null? affiliate with a null value is a few with no way how I'm saying, I'm going to add these three columns 123 and I'm saying that s name is Maria and now I'm saying she'll ever India, okay? I'm saying Mumbai. And now I'm saying this I'm not giving this value because this value is not required.

That's why I'm asking the null. And now I'm saying, as you can see, we have only five records, and we have just inserted the one record. Now I'm saying select the steric column students Ctrl, Enter To execute the query. So now as you can see, we have six values means six records. These are the record sets. And now we have four couples or four rows.

Sorry, six. So now as you can see, this is the value. Yes, I'm talking about and now I want to fetch the records. Who has the null value means I'm saying, Please show me select. Show me that name. Which has the null value that means address from students and seeing where the address that means as address is no control in touch now, as you can see, it's giving us the S name.

Now if I say the steric, enter, so I'm saying s. Okay. Now I'm saying is now if I say is not. So it's giving us all the report because by default, I have not provided the note while creating the table. So that's why you're scheming us. Make sure if we have another value here if I Say that our played students table set S address equals to L okay. Yeah ID equals to six Don't worry about ready if you are not familiar with update.

Now enter. Now select Query SELECT static from students enter. So now as you can see this is the null value. So actually the null value is a field with has no value. Now if I say that select static from students where address is Nell and Cole in tears now they can see you showing us that while you Which has six ID. As you can see this is done that way.

If I say that show me all the record, which has that address field is not null. Now you can see, it's showing us the five records, but actually we have six records. So now I'm saying if I say that select is tearing from the student without a clause. So now as you can see, we it's showing us six ways, or six records. So if I say, where is it address is null. That means I'm saying Oh, please show me all the records, which has the null value.

So Ctrl Enter is showing us six. So in this way, you can fetch the null value with using is null or you can set The values which don't have the null value control interest as you can see she has the five record. So I think this is enough for a next session we are going to cover some other topics. Thank you 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.