Where Clause in SQL

3 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.78
List Price:  €59.89
You save:  €17.11
£37.63
List Price:  £52.68
You save:  £15.05
CA$68.74
List Price:  CA$96.24
You save:  CA$27.50
A$76.46
List Price:  A$107.05
You save:  A$30.59
S$64.18
List Price:  S$89.86
You save:  S$25.68
HK$389.80
List Price:  HK$545.76
You save:  HK$155.95
CHF 40.68
List Price:  CHF 56.96
You save:  CHF 16.27
NOK kr502.83
List Price:  NOK kr704.01
You save:  NOK kr201.17
DKK kr319.32
List Price:  DKK kr447.07
You save:  DKK kr127.75
NZ$84.85
List Price:  NZ$118.79
You save:  NZ$33.94
د.إ183.58
List Price:  د.إ257.03
You save:  د.إ73.45
৳6,068.94
List Price:  ৳8,497.01
You save:  ৳2,428.06
₹4,407.49
List Price:  ₹6,170.83
You save:  ₹1,763.34
RM211.20
List Price:  RM295.70
You save:  RM84.50
₦76,583.41
List Price:  ₦107,222.90
You save:  ₦30,639.49
₨14,158.94
List Price:  ₨19,823.65
You save:  ₨5,664.70
฿1,617.47
List Price:  ฿2,264.59
You save:  ฿647.11
₺2,054.58
List Price:  ₺2,876.58
You save:  ₺822
B$271.51
List Price:  B$380.14
You save:  B$108.62
R882.47
List Price:  R1,235.53
You save:  R353.06
Лв83.59
List Price:  Лв117.04
You save:  Лв33.44
₩69,434.61
List Price:  ₩97,214.01
You save:  ₩27,779.40
₪166.60
List Price:  ₪233.25
You save:  ₪66.65
₱2,853.82
List Price:  ₱3,995.58
You save:  ₱1,141.76
¥7,350.27
List Price:  ¥10,290.97
You save:  ¥2,940.70
MX$932.56
List Price:  MX$1,305.67
You save:  MX$373.10
QR181.90
List Price:  QR254.68
You save:  QR72.77
P671.90
List Price:  P940.72
You save:  P268.81
KSh6,447.90
List Price:  KSh9,027.58
You save:  KSh2,579.67
E£2,397.80
List Price:  E£3,357.12
You save:  E£959.31
ብር7,107.83
List Price:  ብር9,951.53
You save:  ብር2,843.70
Kz45,840.83
List Price:  Kz64,180.83
You save:  Kz18,340
CLP$48,299.21
List Price:  CLP$67,622.76
You save:  CLP$19,323.55
CN¥356.46
List Price:  CN¥499.08
You save:  CN¥142.61
RD$3,142.90
List Price:  RD$4,400.31
You save:  RD$1,257.41
DA6,485.80
List Price:  DA9,080.64
You save:  DA2,594.84
FJ$112.74
List Price:  FJ$157.85
You save:  FJ$45.10
Q382.55
List Price:  Q535.60
You save:  Q153.05
GY$10,437.26
List Price:  GY$14,613.01
You save:  GY$4,175.74
ISK kr6,116.42
List Price:  ISK kr8,563.48
You save:  ISK kr2,447.05
DH449.92
List Price:  DH629.93
You save:  DH180
L831.49
List Price:  L1,164.15
You save:  L332.66
ден2,631.98
List Price:  ден3,684.99
You save:  ден1,053
MOP$400.73
List Price:  MOP$561.05
You save:  MOP$160.32
N$885.92
List Price:  N$1,240.36
You save:  N$354.44
C$1,836.63
List Price:  C$2,571.43
You save:  C$734.80
रु7,038.37
List Price:  रु9,854.29
You save:  रु2,815.91
S/176.64
List Price:  S/247.31
You save:  S/70.67
K211.20
List Price:  K295.70
You save:  K84.50
SAR187.58
List Price:  SAR262.63
You save:  SAR75.04
ZK1,177.09
List Price:  ZK1,648.02
You save:  ZK470.93
L217.05
List Price:  L303.89
You save:  L86.84
Kč1,046.22
List Price:  Kč1,464.79
You save:  Kč418.57
Ft16,984.83
List Price:  Ft23,780.13
You save:  Ft6,795.29
SEK kr472.98
List Price:  SEK kr662.21
You save:  SEK kr189.23
ARS$66,578.34
List Price:  ARS$93,215
You save:  ARS$26,636.66
Bs344.87
List Price:  Bs482.84
You save:  Bs137.97
COP$201,033.58
List Price:  COP$281,463.10
You save:  COP$80,429.51
₡25,201.39
List Price:  ₡35,283.96
You save:  ₡10,082.57
L1,306.73
List Price:  L1,829.53
You save:  L522.79
₲360,827.57
List Price:  ₲505,187.47
You save:  ₲144,359.90
$U1,999.90
List Price:  $U2,800.03
You save:  $U800.12
zł182.41
List Price:  zł255.38
You save:  zł72.97
Already have an account? Log In

Transcript

So now it's time to discuss about the weight loss. So what is weight loss? First of all I'm saying so select stealing from students enroll in. So it's giving us all the records from a table to the students. Now, the where clause is used to filter a record how the where clause is used to extract only those records that fulfill a specific condition. Or suppose you are saying, Oh, please show me the records.

Who has one Id make sure I'm talking about the SI. So how can you do that? I'm saying select steric from his students. Now, same use WHERE clause so WHERE clause we can also use small or capital for you depend upon and saying select Static from where? From student where s ID. So s ID is a condition.

I'm saying where s ID one. Here I'm saying, Oh, please show me all the records from the student tables, who has s ID. So Ctrl, Enter To execute the query. So as you can see, it's showing us only one ID, or and you can also say, Oh, please show me all the record from the student tables, who has the S name equals to Shakespeare. Now I'm saying because this is the integer field, this is their tsp. So that's why I'm using without single or double petition, if I could, and this this this, these are the strings field, so that's why we need to use the single or double petition.

Now I'm seeing that s name. Sue me all the records from Square tables where s name equals two. Now I'm saying shift c Ctrl. Enter To execute the query. So now as you can see, it's showing me only two records. Because the s we have only two records in our table name changes with xy, where clause filter your results.

For suppose if I'm saying Oh, please show me the address, S, address s, address. This Control Enter. So as you can see, it's showing you the will call sheets these are the fields. So in this way, you can use the where clause, if you are using the one column for suppose I only need the address column s. Address column. So I'm saying Oh, please show me only a single column from this current Now I'm saying, Here I'm defining the criteria, or I'm giving the conditions now Ctrl, enter. So you can see it's only giving me the single column, or I'm here saying, Please give me the single column.

Or you can also use select this thing and call it so you can see it's only giving you the unique results. So now it's totally depend upon you how you are logic and what you need. So you can okay so I think this is enough rain in the next lecture we are going to cover some other topics for servers and or nodes. 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.