2016年4月19日
摘要: 在向表中插入数据时,我们经常会遇到这样的情况:1、首先判断数据是否存在;2、如果不存在,则插入;3、如果存在,则更新。 在SQL Server中可以这样处理: if not exists (select 1 from t where id = 1)? insert into t(id, update 阅读全文
posted @ 2016-04-19 13:35 夏沫忆香 阅读(445) 评论(0) 推荐(0)