select fname, lname from employee |
select fname, lname from employee where dno = 4 |
Name and address of all employees: SELECT fname, lname, address, dno FROM employee |
|
You can see some resemblance between SQL and Relational Algebra....
Find project 'ProductX': SELECT pnumber, pname FROM project WHERE pname = 'ProductX' |
Previously: find ssn of employees working on ProductX: SELECT essn FROM works_on, project WHERE pname = 'ProductX' AND pno = pnumber |