Select statement 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.88
List Price:  €60.04
You save:  €17.15
£37.28
List Price:  £52.20
You save:  £14.91
CA$68.97
List Price:  CA$96.57
You save:  CA$27.59
A$76.53
List Price:  A$107.16
You save:  A$30.62
S$64.40
List Price:  S$90.17
You save:  S$25.76
HK$390.02
List Price:  HK$546.07
You save:  HK$156.04
CHF 40.17
List Price:  CHF 56.24
You save:  CHF 16.07
NOK kr501.12
List Price:  NOK kr701.61
You save:  NOK kr200.48
DKK kr320.06
List Price:  DKK kr448.11
You save:  DKK kr128.05
NZ$85.24
List Price:  NZ$119.34
You save:  NZ$34.10
د.إ183.58
List Price:  د.إ257.03
You save:  د.إ73.45
৳6,080.28
List Price:  ৳8,512.87
You save:  ৳2,432.59
₹4,401.80
List Price:  ₹6,162.88
You save:  ₹1,761.07
RM211.33
List Price:  RM295.88
You save:  RM84.55
₦76,807.13
List Price:  ₦107,536.13
You save:  ₦30,729
₨14,145.55
List Price:  ₨19,804.90
You save:  ₨5,659.35
฿1,617
List Price:  ฿2,263.93
You save:  ฿646.93
₺2,057.21
List Price:  ₺2,880.27
You save:  ₺823.05
B$273.48
List Price:  B$382.90
You save:  B$109.41
R881.26
List Price:  R1,233.84
You save:  R352.57
Лв83.94
List Price:  Лв117.53
You save:  Лв33.58
₩69,465.68
List Price:  ₩97,257.52
You save:  ₩27,791.83
₪168.36
List Price:  ₪235.73
You save:  ₪67.36
₱2,864.40
List Price:  ₱4,010.39
You save:  ₱1,145.99
¥7,426.36
List Price:  ¥10,397.50
You save:  ¥2,971.14
MX$935.08
List Price:  MX$1,309.19
You save:  MX$374.10
QR182.14
List Price:  QR255.01
You save:  QR72.87
P673.81
List Price:  P943.39
You save:  P269.58
KSh6,456.20
List Price:  KSh9,039.20
You save:  KSh2,583
E£2,429.22
List Price:  E£3,401.11
You save:  E£971.88
ብር7,142.22
List Price:  ብር9,999.68
You save:  ብር2,857.45
Kz45,588.63
List Price:  Kz63,827.73
You save:  Kz18,239.10
CLP$48,672.26
List Price:  CLP$68,145.06
You save:  CLP$19,472.80
CN¥356.46
List Price:  CN¥499.08
You save:  CN¥142.61
RD$3,148.92
List Price:  RD$4,408.74
You save:  RD$1,259.82
DA6,494.88
List Price:  DA9,093.35
You save:  DA2,598.47
FJ$113.05
List Price:  FJ$158.28
You save:  FJ$45.23
Q383.12
List Price:  Q536.40
You save:  Q153.27
GY$10,452.96
List Price:  GY$14,634.99
You save:  GY$4,182.02
ISK kr6,159.26
List Price:  ISK kr8,623.46
You save:  ISK kr2,464.20
DH452.16
List Price:  DH633.06
You save:  DH180.90
L824.31
List Price:  L1,154.10
You save:  L329.79
ден2,643.86
List Price:  ден3,701.61
You save:  ден1,057.75
MOP$401.89
List Price:  MOP$562.68
You save:  MOP$160.78
N$885.65
List Price:  N$1,239.98
You save:  N$354.33
C$1,839.58
List Price:  C$2,575.56
You save:  C$735.98
रु7,055.44
List Price:  रु9,878.18
You save:  रु2,822.74
S/176.68
List Price:  S/247.37
You save:  S/70.68
K209.61
List Price:  K293.47
You save:  K83.86
SAR187.58
List Price:  SAR262.62
You save:  SAR75.04
ZK1,184.36
List Price:  ZK1,658.21
You save:  ZK473.84
L217.76
List Price:  L304.89
You save:  L87.12
Kč1,048.54
List Price:  Kč1,468.04
You save:  Kč419.50
Ft16,885.54
List Price:  Ft23,641.10
You save:  Ft6,755.56
SEK kr471.84
List Price:  SEK kr660.62
You save:  SEK kr188.77
ARS$67,959.66
List Price:  ARS$95,148.96
You save:  ARS$27,189.30
Bs345.39
List Price:  Bs483.58
You save:  Bs138.18
COP$200,455.99
List Price:  COP$280,654.43
You save:  COP$80,198.43
₡25,271.30
List Price:  ₡35,381.84
You save:  ₡10,110.54
L1,317.54
List Price:  L1,844.66
You save:  L527.12
₲361,036.84
List Price:  ₲505,480.47
You save:  ₲144,443.62
$U2,000.70
List Price:  $U2,801.15
You save:  $U800.44
zł182.35
List Price:  zł255.30
You save:  zł72.95
Already have an account? Log In

Transcript

We are going to discuss about the select statement in SQL. Basically this the select statement is used to select data from the database or from the tables, how you know very well about it because I have already discussed in my previous session, but now I'm defining dB. I'm saying I have show database. So as you can see, I have these databases make sure we are using the union stream database, I am saying SHOW TABLES. So it will show you all the tables in the unity database. As you can see, we have only one table so that's why it's showing one table.

If you have multiple tables in this database, it will show you the multiple tables now empty, I can get I can select all the records. I want to show all the records. I'm saying that select static from this Table students Ctrl Enter. So as you can see, it's showing us four records industrials, tables, static means and things. Show me all the records in this table. It's like English, you're saying select static from students.

That is, you're saying select all the record from students table. Okay? But if you want to show or if you want to view only the SLA, so how can you get only the last name, column, I'm saying here I'm saying as underscore name, your column name goes here. Now from students Ctrl, enter. So you can see it's only showing you the S name. If you are saying that you want to show that s name also with s ID.

So with almost separate, use another column s ID As you can see Ctrl Enter. As you can see, it's showing you the S Id use the S ID as name control. So as you can see first string, the first column, that's why you are using the first column here. And the second column here, if you want to show the city, you can also specify the other column. By separating the comma, Control Enter. Basically, you actually can see it's showing you the also the city.

So it's totally depend upon you, how you need and how you are creating. This is the flag if you are saying Oh, please show me all the columns. So use the static control interface. So you can see it show you all the columns. If you are using the column, which is not available in the table Ctrl Enter so it will give you the error. So it says unknown column Xs s in TVs because x s s column is not available in this table.

So that's why it's giving us an error. So it's really frowned upon. So this is the select statement to selecting all the records from a particular table First of all, if you have another table, so how can you use the table select static that means sorting all the records or all the columns from your x y Zed tables, okay. So I think this is enough for read in the next lecture, we are going to cover some other topics. So 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.