-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,535
  • 1
  • 36
  • 52
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.
  • 6,963
  • 13
  • 28
  • 39
juergen d
  • 195,137
  • 36
  • 275
  • 343