
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Modify Columns of MySQL Table
By using MODIFY keyword with ALTER TABLE command we can modify the column/s of MySQL table. The syntax for the same is as follows;
Syntax
Alter table table_name MODIFY column_name1 datatype, MODIFY column_name2 datatype… MODIFY column_nameN datatype);
Example
In the example below, with the help of MODIFY keyword in ALTER Command, the size of column ‘Address’ and ‘Grade’ has been modified.
mysql> Alter table student modify address varchar(45),Modify Grade Varchar(15); Query OK, 5 rows affected (0.38 sec) Records: 5 Duplicates: 0 Warnings: 0
Advertisements