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.