mysql SQL语句积累
所属分类:
数据库 / Mysql
阅读数:
727
收藏 0赞 0分享
--重命名表
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 delete restrict on update 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 varchar(30) character set utf8 collate utf8_unicode_ci not null;
--增加列
alter table cms_flash add name varchar(30) not null unique;
mysql found_row()使用详解
在参考手册中对found_rows函数的描述是:
it is desirable to know how many rows the statement would have returned without the LIMIT.
也就是说,它返回值是如果SQL语句没有加LI
收藏 0赞 0分享
很全面的MySQL处理重复数据代码
这篇文章主要为大家详细介绍了MySQL处理重复数据的实现代码,如何防止数据表出现重复数据及如何删除数据表中的重复数据,感兴趣的小伙伴们可以参考一下
收藏 0赞 0分享
忘记MySQL的root密码该怎么办
忘记密码总是一件令人头疼的事情,当我们忘记了MySQL的root密码该怎么办?本文给出解决方法,感兴趣的小伙伴们可以参考一下
收藏 0赞 0分享
查看更多