可能重复:
Oracle: how to UPSERT (update or insert into a table?)
How to Perform an UPSERT so that I can use both new and old values in update part
我想知道单个Query如何更新和删除数据库中的数据。
请帮助我:)
答案 0 :(得分:1)
有一个MERGE命令
它可以让你做upserts。从10g开始,它还包含DELETE
子句
答案 1 :(得分:0)
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...); DELETE FROM table_name
WHERE some_column=some_value
我认为
答案 2 :(得分:0)
delete from table where id = 1
update table set name = 'john' where id = 1