-7

Possible Duplicate:
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

I want to know that how a single Query can update and delete data from database .

Please help me with this :)

Community
  • 1
  • 1
Nitesh
  • 163
  • 1
  • 9

3 Answers3

1

There is a MERGE command.
It lets you do upserts. Since 10g it also contains a DELETE clause

A.B.Cade
  • 16,735
  • 1
  • 37
  • 53
0
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...); DELETE FROM table_name
WHERE some_column=some_value

I think

Qzen
  • 23
  • 4
0
delete from table where id = 1
update table set name = 'john' where id = 1
Nikola K.
  • 7,093
  • 13
  • 31
  • 39
juergen d
  • 201,996
  • 37
  • 293
  • 362