Laboratory work 3
Data
manipulation in SQL Oracle
Contents
1. Purpose of the lab 1
2. Theoretical
backgrounds 1
2.1.
Inserting rows in a table 2
2.1.1.
Syntax 2
2.1.2.
Purpose 2
2.1.3.
Prerequisites 2
2.1.4.
Keywords and Parameters 2
2.1.5.
Examples 3
2.2.
Updating rows in a table 3
2.2.1.
Syntax 3
2.2.2.
Purpose 3
2.2.3.
Prerequisites 3
2.2.4.
Keywords and Parameters 3
2.2.5.
Examples 4
2.3.
Deleting rows in a table 5
2.3.1.
Syntax 5
2.3.2.
Purpose 5
2.3.3.
Prerequisites 5
2.3.4.
Keywords and Parameters 5
2.3.5.
Examples 5
3. Lab tasks 6
3.1.1.
Inserting rows in tables 6
3.1.2.
Updating rows in tables 7
4. Control questions 7
Purpose of the lab
To study SQL Oracle possibilities in inserting, updating and
deleting rows in a tables.
To acquire practical skills in inserting, updating and deleting rows
in a tables by using SQL*Plus.
Theoretical backgrounds
There are three SQL statements that enable you to manipulate the data
within a database's table. These statements are the following:
The INSERTstatement – allows to add new rows of data into a tables.
The UPDATEstatement – allows to change column values in existing rows of a
table.
The DELETEstatement – allows to remove rows from a table.
Inserting rows in a table
Syntax
Purpose
To add rows to a table.
Prerequisites
For you to insert rows into a table, the table must be in your own
schema or you must have INSERT privilege on the table.
If you have the INSERT ANY TABLE system privilege, you can also
insert rows into any table.