replace into = insert into + delete from
来源:互联网 发布:淘宝能卖药品吗 编辑:程序博客网 时间:2024/05/17 05:06
replace into相当于全自动加强版的insert into。
它的步骤是:
1)执行insert into,发现primary key与已有记录重复了;
2)delete from这条重复primary key记录。
3)继续尝试insert into,发现unique key又重复了;
4)delete from这条重复的unique key记录。
5)再次insert into,这次终于OK,于是可以看到 affected rows是3条记录。真是不达目的誓不罢休的一个命令2333。
0 0
- replace into = insert into + delete from
- Replace INTO与INSERT INTO
- mysql insert into & replace into & insert ignore into
- mysql insert into replace into insert ignore into 用法
- Replace INTO与INSERT INTO的不同之处
- Replace INTO与INSERT INTO的不同之处
- Replace INTO与INSERT INTO的不同之处
- replace into和insert into 的区别
- replace into和insert into区别
- insert into select from
- insert into select from
- insert into from与select into from
- insert into from与select into from
- Replace into与Insert update
- Replace into与Insert update
- Insert into select 和 select into from
- SELECT INTO FROM 与 INSERT INTO SELECT
- SELECT INTO FROM与INSERT INTO SELECT
- (预处理,初始化)近似回文词 Almost Palindrome,9th湖南省赛A
- java中异常到底有什么用?举例
- 做的最小生成树第二个题,以为不对呢,谁知交上就AC啦
- 关于Android开发屏幕适配
- 反渗透设备:一级反渗透纯水设备工艺概述
- replace into = insert into + delete from
- 烟花厂车辆监控管理系统解决方案
- 只有走过的路 才懂她的内容
- Tomcat 集群配置
- 技术精英谈IT程序员的出路在哪里——很经典
- hadoop-client和jetty的冲突解决
- java中异常这种技术框架是怎么工作的?
- Raphaeljs入门到精通(一)
- CListCtrl修改指定行的颜色