mysql 插入更新一条sql 搞定

插入数据时,咱们常常会遇到这样的状况:一、首先判断数据是否存在;二、若是不存在,则插入;三、若是存在,则更新。mysql 在SQL Server中能够这样处理:sql if not exists (select 1 from t where id = 1)? insert into t(id, update_time) values(1, getdate()) else update t set
相关文章
相关标签/搜索