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
SQL Alter Table Name
Mysql Alter Table Syntax
Mysql Alter Table
mysql alter table add unique constraint
SQL Alter Table Primary Key
alter table add foreign key mysql
SQL Alter Table Primary Key tutorial
SQL Alter Table Syntax
ModuleNotFoundError: No module named 'mysqlx-connector'
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
SQL Alter Table Add Multiple Columns
PHP MySQLi
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
jdbc mysqll - JDBC
PHP MySQLi Query
How to rename MySQL table?
SQL Alter Column Name
SQL Alter Column
SQL Alter Column Syntax
Mysql Alter Unique Key
Mysql Alter Data Type
Mysql Alter Column Datatype
Mysql Alter Column Size
MySql Alter Database
Mysql Alter Drop
Mysql Alter Rename Column
SQL Alter Column Default Value
Mysql Alter Remove Column
Mysql Alter Autoincrement
alter data type

Ads