How alter table in MySQL?

How alter table in MySQL?

Hi,

I have a table and I want to alter an int field into text field. How to alter the table in MySQL?

Thanks

View Answers

December 14, 2013 at 4:14 PM

Hi,

You can use the following query:

alter table employees change empid empid varchar(100);

Check the tutorial Mysql Alter Column Datatype.

Check more examples of alter table statements in MySQL.

Thanks









Related Tutorials/Questions & Answers:
How alter table in MySQL?
JDBC: Alter Table Example
Advertisements
SQL Alter Table Name
SQL Alter Table
mysql alter table add column
alter table create index mysql
alter table create index mysql
Mysql Alter Table
SQL Alter Table Name
Mysql Alter Table Syntax
mysql alter table add unique constraint
SQL Alter Table Primary Key
alter table add foreign key mysql
ModuleNotFoundError: No module named 'mysqlx-connector'
SQL Alter Table Primary Key tutorial
SQL Alter Table Syntax
Mysql Alter Rename Table
Mysql Alter Rename Table
MySql Alter User
mysql alter table add multiple columns
Mysql Alter Table Identity
Mysql Alter Table
SQL Alter Table
SQL Alter Table Add Multiple Columns
Mysql Alter Table Primary Key
PHP MySQLi
SQL Alter Table Add Multiple Columns
PHP MySQLi Affected Rows
PHP MySQLI Prep Statement
Alter Database Table Using JDBC Batch Process
Hibernate 5 MySQL5 Dialect
Hibernate 5 MySQL5 Dialect
Hibernate 5 MySQL5 Dialect
PHP MySQLi Query
jdbc mysqll - JDBC
SQL Alter Column
SQL Alter Column Name
SQL Alter Column Syntax
Mysql Alter Unique Key
Mysql Alter Data Type
How to rename MySQL table?
Mysql Alter Column Datatype
Mysql Alter Column Size
MySql Alter Database
Mysql Alter Drop
Mysql Alter Rename Column
Mysql Alter Remove Column
SQL Alter Column Default Value
Mysql Alter Autoincrement
alter data type

Ads