Page 155 - Informatics_Practices_Fliipbook_Class12
P. 155
In text exercise:
Pin_ Dept_
ID FName LName Gender Address City DOB Salary
Code No
10001 Raj Reddy M West Godavari Andhra 534197 1980-06- 100000 2
Pradesh 13
10002 Dhiraj Bora M Dispur, Guwahati 781005 1975-09- 85000 1
Kamrup, Assam 30
10003 Muskan Taneja F 8/33, Geeta Delhi 110031 1990-01- 100000 2
Colony 25
10004 Hiten Oberoi M 15, Dimna Jamshedpur 831018 1985-06- 100000 4
Road, Mango 24
10005 Anshul Verma M House 10, Noida 201304 1990-01- 100000 1
Sector 16, 01
Gautum Budh
Nagar
10006 Rajit Gadh F 12, Beldih Jamshedpur 831001 1960-05- 60000 4
Triangle, 07
Bistupur
10007 Taran Adarsh M B-76, CST Mumbai 400098 1965-01- 70000 5
Road, Kalina, 13
Santacruz East
10008 Naval Dhingra M E-14 Vivek Delhi 110095 1975-08- 70000 2
Vihar 04
10009 Naveen Basra F 28, Aambagan Jamshedpur 831001 1980-09- 60000 4
Road, Sakechi 24
10010 Savita Ambedkar F C-49, G-Block, Mumbai 400051 1987-07- 50000 5
Bandra Kurla, 11
Bandra East
Table 4.3: EMPLOYEE table after inserting some tuples
In Table 4.3, we have shown the tuples in the order in which they were inserted in the table. However, a relational
DBMS does not ensure any specific order of the tuples. Placing the tuples in a particular sequence does not impact the
database operations.
DELETE statement
To delete a tuple (satisfying a particular criterion) from a table, we use the DELETE statement.
The syntax of the delete statement is as follows:
DELETE FROM table_name
WHERE criterion-for-selecting-specific-tuple;
For example, to delete the tuple from the EMPLOYEE table whose ID is E0007, we execute the following SQL
statement:
DELETE FROM EMPLOYEE
WHERE ID = 'E0007';
Let us now execute the statement that shows the current state of the table from which the tuple corresponding to the
employee having ID E0007 has been deleted.
Database Query using SQL 141

