Hello guys, I am Shahzad and welcome to lecture number 28. Today's we are going to discuss about the tables. How can you create your tables? How can you define the columns name? How can you define the data types for the columns? So now, with this statement, you can show all the databases available in your database.
I'm talking about the databases name, okay. So you know very well that we have our database, I'm saying use University database, that means I'm saying I'm going to work on this database. So as you can see, by default, it's here selected if I say that ACI use a CSS, it's a database name. Now, as you can see, the editor just changed the database. Now, if I say select static. From there, you can see you're showing me the tables available in the ACI database now I'm saying us University database because we are working on the union syllabus.
So now how can you create the tables we have created a table in our previous lectures, but using the CREATE TABLE statement, you can create the tables for your database for a particular database. Okay, now I'm saying SHOW TABLES. Okay, for now, as you can see, we have only two tables, I'm going to create the class tables, classes tables, okay, now I'm saying create tables. So this is the syntax to create a particular tables your table name here, you have to define your table name, and also the column name one, column name two, and so on. So now I'm saying I'm going to create the Colossus tables. And now the columns are I'm saying CL ID.
Make sure CL ID You have to define the data types also. Now I'm saying if St Peter and now I'm saying CLM. That means class name, class underscore name, I'm saying so var char, then you have to define how many characters you are assigning, I am saying 255. Now with the comma separated, you have to use a comma because this is the first column and this is the second column. Now, if you say that serial number, that means room number, I'm saying whom I'm also saying Indonesia, if you are going to store the values here, okay, now I'm saying it's 20 or hundred actually depend upon your requirement. So these are the basic three columns are so these are the data types available.
You can also use the data time, date time and also their time is Pam and also the year. So if I add the date here, I'm saying CL H, it's a date. And now what I need I just need to execute this query. You can also execute this query by clicking on the by right click and hit hit this button or the Execute button or as you can see, the editor is saying that please press the ctrl plus ENTER button to execute the current query. Same thing Ctrl Enter. Okay, now we have created the table name classes.
Now if I say SHOW TABLES so you can see now I'm here we have three tables in the database, which is the UDS database. We have created Tables if I'm saying select static from tables or fully from classes, so definitely it will return the empty because we have not inserted and record in this table. So you want to insert the record what you just need to add insert to insert into and classes. And then definitely you have to you have to specify the columns and you have Well, we'll discuss about this but for now we have successfully created a particular column or the particular database and also the columns. Now how can you drop your databases you have a syntax which is the drop then you have to use the table keyword and also the table name. So your table names here, Rob, we have created the table Which is the class table.
Now I'm saying drop tables and classes. So now Ctrl Enter. I'm saying SHOW TABLES. So as you can see, it's showing us the two tables, we have successfully created the tables and we have dropped a particular table which we have just created. So in this way you can create the tables and also you can drop any tables from your database. In the next lecture, we are going to cover that how can you alter your tables?
How can you add a particular column in existing tables? How can you drop a particular column so thank you for watching.