mysql增加列修改列名列属性以及删除列_MySQL
Jun 01, 2016 pm 01:44 PMbitsCN.com
首先推荐一本初学者的书,一个小册子:《mysql必知必会》简介实用,权威;有点贵,昨天才买的。
http:///ebook/201112/30389.html
正文:
mysql修改表名,列名,列类型,添加表列,删除表列
修改表名(设表明为testtable,将其命名为newtablename)
alter table testtable rename newtablename;
添加表列:
alter table testtable add column name varchar(40);
删除列:
alter table testtable drop column name;
修改列的类型:
alter table testtable modify address char(40)
或者这样:alter table testtable change address address char(40)
修改表列名
alter table testtable change column address address1 varchar(30)
作者 naturebe
bitsCN.com
Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP's big data structure processing skills

How to optimize MySQL query performance in PHP?

How to use MySQL backup and restore in PHP?

How to insert data into a MySQL table using PHP?

What are the application scenarios of Java enumeration types in databases?

How to fix mysql_native_password not loaded errors on MySQL 8.4

How to use MySQL stored procedures in PHP?

How to create a MySQL table using PHP?
