Chapter06 Database
Chapter06 Database
Navathe
CHAPTER 6
Basic SQL
DEFAULT <value>
NULL is not permitted for a particular attribute
(NOT NULL)
CHECK clause
Query 8. For each employee, retrieve the employee’s first and last name
and the first and last name of his or her immediate supervisor.
SELECT E.Fname, E.Lname, S.Fname, S.Lname
FROM EMPLOYEE AS E, EMPLOYEE AS S
WHERE E.Super_ssn=S.Ssn;
Recommended practice to abbreviate names and to
prefix same or similar attribute from multiple tables.
Tuples are deleted from only one table at a time (unless
CASCADE is specified on a referential integrity
constraint)
A missing WHERE-clause specifies that all tuples in the
The reference to the SALARY attribute on the right of =
refers to the old SALARY value before modification
The reference to the SALARY attribute on the left of =
refers to the new SALARY value after modification