Alter Table In MySql
SUMMARY
In this video we will learn about alter table in mysql.
PURPOSE OF ALTER TABLE
Generally it is used to add column ,rename table ,drop column and modify data type of a column.Moreover any modification will be done after creating a table using alter table command.
PREREQUISITE
In the above video first we login our mysql server . Then check all database list and select our preferred database.you select your database as per your requirement. In our case we select techrideradmin database . Then select the table list within the database. In our case we select department table. Now fetch all records form the table.
SOME EXAMPLE FOR ALTER TABLE
We have some queries about alter tablespace. These are given below.
2) Now we want to drop city column uisng alter table command.
3) Now we want to rename dept table to department using alter table query.
4) Now we can change datatype of SAL column from int to varchar using alter table query.
CONCLUSION
In this video we have learned about alter table in mysql.
Visit Website for more details: techrideradmin.blogspot.com
0 Comments