Page 163 - Informatics_Practices_Fliipbook_Class12
P. 163
Executing the above statement will produce output shown in Table 4.7.
Pin_ Dept_
ID FName LName Gender Address City DOB Salary
Code No
10001 Raj Reddy M West Andhra 534197 1980-06-13 100000 2
Godavari Pradesh
10002 Dhiraj Bora M Dispur, Guwahati 781005 1975-09-30 85000 1
Kamrup,
Assam
10003 Muskan Taneja F 8/33, Geeta Delhi 110031 1990-01-25 100000 2
Colony
10004 Hiten Oberoi M 15, Dimna Jamshedpur 831018 1985-06-24 100000 4
Road, Mango
10005 Anshul Verma M House 10, Noida 201304 1990-01-01 100000 1
Sector 16,
Gautam Budh
Nagar
10006 Rajit Gadh F 12, Beldih Jamshedpur 831001 1960-05-07 60000 4
Triangle,
Bistupur
10007 Taran Adarsh M B-76, CST Mumbai 400098 1965-01-13 70000 5
Road, Kalina,
Santacruz
East
10008 Naval Dhingra M E-14 Vivek Delhi 110095 1975-08-04 70000 2
Vihar
10009 Naveen Basra F 28, Jamshedpur 831001 1980-09-24 60000 4
Aambagan
Road, Sakechi
10010 Savita Ambedkar F C-49, Mumbai 400051 1987-07-11 50000 5
G-Block,
Bandra Kurla,
Bandra East
Table 4.7: All details of employees in EMPLOYEE table
SQL provides a WHERE clause that facilitates retrieval of only those tuples that satisfy the condition specified in the
WHERE clause. Syntax of a SELECT statement with WHERE clause is given below:
SELECT attribute_list
FROM table_name
WHERE condition;
SELECT statement - retrieves the attribute values from the table.
Here condition may be a simple condition or may involve several simple conditions and use of logical operators:
Database Query using SQL 149

