sql/db
ef-dfef
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mysql基于查询结果批量插入和更新
One possible way to do this is to create a temporary table, insert the data into that, and then do 1 query with a join to insert the records that don't exist followed by and update to the fields tha转载 2014-11-14 15:18:25 · 9497 阅读 · 0 评论 -
mysqldump备份与恢复数据库
-- export all tables structure and data mysqldump -uroot -p db-name > /path/to/dump.sql -- export all tables structure and data, reset AUTO_INCREMENT mysqldump -uroot -p db-name | sed 's/ AUTO_原创 2014-12-19 14:38:23 · 685 阅读 · 0 评论 -
日期类型比较
表:User ( id, createdOn ) ——(id,创建时间) situation #1 查出所有创建时间在2011年9月1日之后的记录。 # mysql (最简单了) select * from user where createdOn>'2011-09-01' # mysql的日期处理能力很强大,可以精确到年、月、日、时、分、秒、毫秒。 # 例如: select原创 2011-10-27 14:00:45 · 562 阅读 · 0 评论
分享