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
€46.74
List Price:  €65.44
You save:  €18.70
£40.02
List Price:  £56.04
You save:  £16.01
CA$68.38
List Price:  CA$95.74
You save:  CA$27.36
A$76.50
List Price:  A$107.11
You save:  A$30.60
S$68.11
List Price:  S$95.36
You save:  S$27.25
HK$391.33
List Price:  HK$547.90
You save:  HK$156.56
CHF 45.73
List Price:  CHF 64.03
You save:  CHF 18.29
NOK kr551.82
List Price:  NOK kr772.60
You save:  NOK kr220.77
DKK kr348.47
List Price:  DKK kr487.88
You save:  DKK kr139.41
NZ$84.17
List Price:  NZ$117.84
You save:  NZ$33.67
د.إ183.60
List Price:  د.إ257.06
You save:  د.إ73.45
৳5,499.99
List Price:  ৳7,700.43
You save:  ৳2,200.43
₹4,169.28
List Price:  ₹5,837.33
You save:  ₹1,668.04
RM238.42
List Price:  RM333.81
You save:  RM95.39
₦66,060.50
List Price:  ₦92,489.99
You save:  ₦26,429.48
₨13,909.47
List Price:  ₨19,474.37
You save:  ₨5,564.90
฿1,848.90
List Price:  ฿2,588.61
You save:  ฿739.70
₺1,625.07
List Price:  ₺2,275.23
You save:  ₺650.15
B$255.76
List Price:  B$358.08
You save:  B$102.32
R937.79
List Price:  R1,312.98
You save:  R375.19
Лв91.35
List Price:  Лв127.91
You save:  Лв36.55
₩68,890.62
List Price:  ₩96,452.39
You save:  ₩27,561.76
₪191.22
List Price:  ₪267.73
You save:  ₪76.50
₱2,881.72
List Price:  ₱4,034.64
You save:  ₱1,152.92
¥7,903.16
List Price:  ¥11,065.06
You save:  ¥3,161.90
MX$857.83
List Price:  MX$1,201.03
You save:  MX$343.20
QR182.17
List Price:  QR255.05
You save:  QR72.88
P689.81
List Price:  P965.79
You save:  P275.98
KSh6,639.79
List Price:  KSh9,296.24
You save:  KSh2,656.45
E£2,392.59
List Price:  E£3,349.82
You save:  E£957.23
ብር2,846.33
List Price:  ብር3,985.10
You save:  ብር1,138.76
Kz41,694.65
List Price:  Kz58,375.85
You save:  Kz16,681.20
CLP$47,408.51
List Price:  CLP$66,375.71
You save:  CLP$18,967.20
CN¥362.20
List Price:  CN¥507.11
You save:  CN¥144.91
RD$2,937.78
List Price:  RD$4,113.13
You save:  RD$1,175.34
DA6,708.56
List Price:  DA9,392.53
You save:  DA2,683.96
FJ$113.10
List Price:  FJ$158.35
You save:  FJ$45.25
Q388.59
List Price:  Q544.06
You save:  Q155.47
GY$10,484.28
List Price:  GY$14,678.83
You save:  GY$4,194.55
ISK kr7,026.59
List Price:  ISK kr9,837.79
You save:  ISK kr2,811.20
DH506.20
List Price:  DH708.72
You save:  DH202.52
L890.49
List Price:  L1,246.75
You save:  L356.26
ден2,874.95
List Price:  ден4,025.16
You save:  ден1,150.21
MOP$404.09
List Price:  MOP$565.76
You save:  MOP$161.67
N$957.24
List Price:  N$1,340.22
You save:  N$382.97
C$1,844.23
List Price:  C$2,582.07
You save:  C$737.84
रु6,681.04
List Price:  रु9,353.99
You save:  रु2,672.95
S/188.25
List Price:  S/263.57
You save:  S/75.31
K193.43
List Price:  K270.82
You save:  K77.39
SAR187.48
List Price:  SAR262.50
You save:  SAR75.01
ZK1,328
List Price:  ZK1,859.31
You save:  ZK531.30
L232.80
List Price:  L325.94
You save:  L93.14
Kč1,174.50
List Price:  Kč1,644.39
You save:  Kč469.89
Ft18,370.82
List Price:  Ft25,720.62
You save:  Ft7,349.80
SEK kr544.35
List Price:  SEK kr762.14
You save:  SEK kr217.78
ARS$43,693.47
List Price:  ARS$61,174.36
You save:  ARS$17,480.88
Bs347.54
List Price:  Bs486.59
You save:  Bs139.04
COP$198,223.63
List Price:  COP$277,528.94
You save:  COP$79,305.31
₡25,122.12
List Price:  ₡35,172.98
You save:  ₡10,050.86
L1,237.47
List Price:  L1,732.56
You save:  L495.08
₲372,019.98
List Price:  ₲520,857.74
You save:  ₲148,837.76
$U1,930.85
List Price:  $U2,703.34
You save:  $U772.49
zł201.68
List Price:  zł282.38
You save:  zł80.69
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.