You created a table with specific size of column. Sometimes you need to increase the size of column, if the size is not enough. At the time, you can modify the size of field. It is possible in mysql. The following mysql query is used for this:
Alter table table1 modify Game_name varchar(40)
Now your structure look like this:
Now your output look like this:
Now you will get output as Game_name with 50 size and Image with 40 size.
Related Post:
Mysql Query:
Alter table table_name modify column_name datatype(length)
Suppose you've to add more characters to column Game_name. On that time you can change the field size. The mysql query is:
Consider the example:
table1 is name of this table.
table1 is name of this table.
Alter table table1 modify Game_name varchar(40)
Now your structure look like this:
Now your Game_name column size is changed into 40.
Changing the multiple column size at the time in mysql:
You can change multiple column size at a time in mysql. The mysql query as follow as:
Mysql Query:
Alter table table1
modify Game_name varchar(50),
modify Image varchar(40)
Now your output look like this:
Now you will get output as Game_name with 50 size and Image with 40 size.
Related Post:
Add column after specific field in mysql table
Delete column in mysql table
Change column name in mysql
Change column datatype in mysql
Change column NOT NULL to NULL in mysql
Add primary key to existing column in mysql
how to add auto increment to existing column in mysql
How to remove auto increment from column in mysql
Delete column in mysql table
Change column name in mysql
Change column datatype in mysql
Change column NOT NULL to NULL in mysql
Add primary key to existing column in mysql
how to add auto increment to existing column in mysql
How to remove auto increment from column in mysql
No comments:
Post a Comment