SQL 百分网手机站

mysql SQL语句积累参考

时间:2018-04-26 17:11:32 SQL 我要投稿

mysql SQL语句积累参考

  --重命名表

  rename table t_softwareport to software_port;

  --建立外键

  alter table software_port add constraint fk_software_port_softwareprocessid foreign key (softwareprocessid) references software_process (id) on restrict on restrict;

  --删除列

  alter table software_type drop column upid, drop column orderid;

  --修改列名

  alter table software_process change software_id softwareid int(11) not null;

  --更改列编码

  alter table cms_contentbody modify column offical_site_name var30) character set utf8 collate utf8_unicode_ci not null;

  --增加列

  alter table cms_flash add name var30) not null unique;

【mysql SQL语句积累参考】相关文章:

1.SQL语句详解 MySQL update的用法

2.关于MySQL开启记录执行过的SQL语句方法

3.SQL语句结构示例

4.sql语句的使用

5.oracle的sql语句

6.SQL语句的功能

7.MySQL导出导入SQL文件命令方法

8.SQL语句优化的经验