Categories
MySQL

MySQL ALTER TABLE, DROP TABLE

To change the structure of a table you use ALTER TABLE statement. This allows you to add or drop column, change data type, rename table etc.

Example of ALTER TABLE:

ALTER TABLE table_name CHANGE COLUMN table_id table_id INT(11) NOT NULL AUTO_INCREMENT;

To remove existing table you need to use DROP TABLE statement as below:

You may like:  Store IP Addresses as UNSIGNED INT

Example of DROP TABLE:

DROP TABLE IF EXISTS table_name;
Avatar for Namaste UI (Author)

By Namaste UI (Author)

Namaste UI collaborates closely with clients to develop tailored guest posting strategies that align with their unique goals and target audiences. Their commitment to delivering high-quality, niche-specific content ensures that each guest post not only meets but exceeds the expectations of both clients and the hosting platforms. Connect with us on social media for the latest updates on guest posting trends, outreach strategies, and digital marketing tips. For any types of guest posting services, contact us on info[at]namasteui.com.

Leave a Reply

Your email address will not be published. Required fields are marked *