MySQL常用操作
1、字符串拼接:
update products a,categorys b set a.categoryNumbers = concat(b.parent,",",a.categoryId,",")
where b.id = a.categoryId
1、字符串拼接:
update products a,categorys b set a.categoryNumbers = concat(b.parent,",",a.categoryId,",")
where b.id = a.categoryId
首先,这片文章纯粹是我的个人经验之谈,适用于我常见的环境及项目中.个人建议,数据库字符集尽量使用utf8(HTML页面对应的是utf-8),以使你的数据能很顺利的实现迁移,因为utf8字符集是目前最适合于实现多种不同字符集之间的转换的...…
MySql导入SQL文件: mysql -u root -p <c:\sampledb.sql…
MySQL支持大量的列类型,它可以被分为3类:数字类型、日期和时间类型以及字符串(字符)类型。本节首先给出可用类型的一个概述,并且总结每个列类型的存储需求,然后提供每个类中的类型性质的更详细的描述。概述有意简化,…
mysql备份语句:E:\MySQL Server 5.0\bin>mysqldump -uroot -padmin --default-character-set=utf8 --opt --extended-insert=false --triggers -R --hex-blob -x s…
truncate categorys…
今天,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显。关于数据库的性能,这并不只是DBA才需要担心的事,而这更是我 们程序员需要去关注的事情。当我们去设计数据库表结构,对操作数据库时(尤...…