Oracle Programming/Manipulating Data

From Wikibooks, open books for an open world
Jump to: navigation, search

Describing each data manipulation language (DML) statement[edit]

Inserting rows into a table[edit]

Insert into [table name][column1,column2,.....] values(value1,value2,....);

Updating rows in a table[edit]

To update rows in a table, write : update [table name] set [column name] = [your value];

It will update all the rows present in the table by the given value in the selected field.

We can also add queries to this command to make a real use for example,

update [table name] set [column name] = [value] where [column name]>=[value];

You can add your query after the where clause according to your need.

Deleting rows from a table[edit]

Controlling transactions[edit]

  1. Save and discard changes with the COMMIT and ROLLBACK statements
  2. Explain read consistency