Wednesday, March 21, 2018

Oracle Insert,Select,Update & Delete Table Operations

In Oracle database management system we perform four main operations on table Insert,Select,Update and  Delete. These all are DML Operations i.e. Data Manipulation Language operations. So COMMIT command is required after executing above command on table. 

Oracle Insert Query
Oracle Create New Record in table is performed using Insert Query on table

Syntax of insert query mentioned below,

INSERT INTO Table_Name (Column1,Column2, ........ ColumnN)VALUES(Value1,Value2,..........ValueN);

Above insert query create new record in the table and insert Value1 in Column1, Value2 in Column2 and so on.

Oracle Select Query i.e. Read Record
Oracle Select query select multiple rows from table

Syntax of select query mentioned below,
SELECT *  FROM Table_Name 

Above select query read all record from Table_Name

SELECT * FROM Table_Name WHERE Column1 = Value

Above select command returns records from Table_Name,who satisfy the condition written next to where command

Oracle Update Query 
Oracle Update query update existing record from table who satisfy where clause conditions 

Syntax of update query mentioned below,
UPDATE Table_Name SET Column_Name1 = Value1,Column_Name2=Value2 WHERE Column_Name = Value

Above update command update existing column values to new values using SET keyword.

Oracle Delete Query
Oracle delete query delete records from table.

Syntax of delete query mentioned below,

DELETE FROM Table_Name WHERE Column_Name = Value

Above delete command delete records from Table_Name who satisfying condition next to where clause.

So after executing above commands COMMIT command  is need to execute for commit all changes in database.


Post a Comment