[转]mysql alter 语句用法,添加、修改、删除字段等
mysql alter 语句用法,添加、修改、删除字段等
//主键549830479
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//增加一个新列549830479
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default '0';
//删除列549830479
alter table t2 drop column c;
//重命名列549830479
alter table t1 change a b integer;
//改变列的类型549830479
alter table t1 change b b bigint not null;
alter table infos change list list tinyint not null default '0';
//重命名表549830479
alter table t1 rename t2;
加索引549830479
mysql> alter table tablename change depno depno int(5) not null; &n
相关文档:
一直想写点东西,但却迟迟没有开始,今天无意中回到ERP100这个网站,发现有了QAD的专区,于是,一时热血沸腾,写了点东西,就借此机会将内容也发到这里吧,呵呵。
其实内容都是本人写的,不过为了图方便,在ERP100中写完了,然后直接Copy到这里,偷了点懒,呵呵。
以下是正文,在ERP100中的地址是
http://bbs.erp100.com ......
1、下载MySQL的Linux安装文件
Linux下安装MySQL需要下面两个文件:
MySQL-server-5.1.7-0.i386.rpm
下载地址为:http://dev.mysql.com/downloads/mysql/5.1.html,打开此网页,下拉网页找到“Linux x86 generic RPM (statically linked against glibc 2.2.5) downloads”项,找到“Ser ......
Some problems encounted this afternoon, when trying to setup/test mysql capabilities on hypnos and virgil.
1.ERROR 2003 (HY000): Can't connect to MySQL server on 'server-name' (111)
access locally (i.e. from localhost) is fine, when trying remotely got this error. when tried with mysql++ library, ......
MySQL数据库备份和还原的常用命令
原文见http://www.21andy.com/blog/20071102/655.html
时间:2007-11-02 23:29:09 类别:技术 访问:3,731 views RSS 2.0 评论
备份MySQL数据库的命令
mysqldump -hhostname -uusername -ppassword database ......