EXAMPLE of use of CASE ◼ The following example shows that employees are receiving different raises in different departments (A variation of the update U6)
◼ U6’: UPDATE EMPLOYEE
SET Salary = CASE WHEN Dno = 5THEN Salary + 2000 WHEN Dno = 4THEN Salary + 1500 WHEN Dno = 1THEN Salary + 3000
The ALTER Command ◼ ALTER command ◼ Used to modify the definition of schema elements ◼ Different sub commands and syntax variations depending on the nature of the object
◼ Alter table actions include:
◼ Adding/dropping/changing a column (attribute) ◼ Adding/dropping constraints