Alter Columns in SQL

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.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

Hello, I am Shahzad and welcome to lecture number 29. Today's we are going to alter the tables so you can easily understand how can you alter or add or delete your tables. Whenever I say enter, that means I'm talking about, I'm going to insert the column or I'm going to delete a particular column from the tables. So we have two tables. As you know, we have two tables. Now I need to create another tables.

So how can you create your tables in previous lecture lecture we have discussed that the table creation process. So now I'm saying create and the tables so this is the syntax, I'm saying, classes. Classes is the table name. And now I have to define the columns here. I'm saying CL ID. I'm saying it's a teacher fee, comma, separate.

I'm saying CLS That means I'm talking about the class name. And now I'm saying it's a wash our feet, that means I'm going to stroll the characters in this column. So now I'm saying washer 200 or 250. So they depend upon you. I think 100 is enough. Okay, I'm seeing through number classroom or something else, I'm seeing status, or I'm seeing who how many columns are, you need to create in a particular table is totally depend upon your requirement.

Now I am saying name from Wireshark. Now I'm saying let suppose 200 actually divide them for now I'm going to create c column in this table. So I have created the columns. Now I'm saying SHOW TABLES. So you can see we have three tables available in the university database, we have created the classes tables. Now I'm saying select static form classes.

As you can see, we have three columns. Make sure how can you alter your tables I'm saying the alter, I'm going to add a particular column, a new column, I'm saying alter tables. And your table name goes here I'm saying classes and into this tables I'm saying add. So add. This is a keyword to add a columns and you have to write a column name I'm saying CL date. I'm going to add this column name and the format is date.

Get now hit the enter button. I'm saying select static form classes. So as you can see, now we have successfully inserted a particular column. So here as you can see, we have inserted a column. Now how can you You can also create another columns by repeating the same process. And now how can you drop a particular columns I'm saying alter three tables from classes, net one thing.

Drop column, this is syntax and you have to specify the column name. I'm saying I'm going to drop this column CL, date, CL, date Ctrl, Enter To execute the Curie. Now I'm saying select a static form class. As you can see we have successfully drop the column which we have created. Okay, so in this way you can add many columns in a particular tables and you can also drop a lot of columns or a particular column from your tables. So I hope you're enjoying the series if you think we are playing golf if we share our courses and also the videos, 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.