会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
二宝的博客
博客园
首页
新随笔
联系
订阅
管理
2011年8月10日
MySQL replace into
摘要: 在向表中插入数据的时候,经常遇到这样的情况:1. 首先判断数据是否存在; 2. 如果不存在,则插入;3.如果存在,则更新。在 SQL Server 中可以这样处理: if not exists (select 1 from t where id = 1) insert into t(id, update_time) values(1, getdate()) else update t set up...
阅读全文
posted @ 2011-08-10 17:46 二宝的博客
阅读(168)
评论(0)
推荐(0)
编辑
公告