MySQL中的INSERT和UPDATE有什么区别? [英] What are differences between INSERT and UPDATE in MySQL?
本文介绍了MySQL中的INSERT和UPDATE有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
看来INSERT
和UPDATE
对我做同样的事情.
It seems INSERT
and UPDATE
do the same things to me.
在任何情况下我应该使用INSERT
代替UPDATE
,反之亦然吗?
Is there any occasions where I should use INSERT
instead of UPDATE
and vice versa?
推荐答案
在 CRUD操作,INSERT
是'C',而UPDATE
是'U'.它们是持久性存储的四个基本功能中的两个.其他两个是SELECT
和DELETE
.如果没有至少这四个操作,则无法将典型的数据库系统视为完整的数据库.
In CRUD operations, the INSERT
is the 'C' and the UPDATE
is the 'U'. They are two of the four basic functions of persistent storage. The other two are SELECT
and DELETE
. Without at least these four operations, a typical database system cannot be considered complete.
使用INSERT
插入新记录.
使用UPDATE
更新现有记录.
这篇关于MySQL中的INSERT和UPDATE有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文