Create a view that will display name, department number, and total income (salary+commission) of each employee in department 10. Prevent change of department through the view.
Use case study databases for the following queries.
```
SQL> CREATE OR REPLACE VIEW EMP_TOTSAL_VU
2 AS
3 SELECT LNAME, FNAME, SALARY+NVL(COMMISSION,0) TOTSAL
4 FROM EMPLOYEE
5 WHERE DEPTID=10
6 WITH CHECK OPTION;
VIEW CREATED.
```
Computer Science & Information Technology
You might also like to view...
A mixture of programming language and human language is known as:
a. Algorithms b. Recipes c. Directions d. Pseudocode
Computer Science & Information Technology
Using the below relational schema, determine whether the following query is both type and semantically correct:
SELECT P.petNo, petName, oName, O.TelNo FROM Pet P, Owner O, Prescription Pr, Medication M, Surgery S WHERE Pr.medNo = M.medNo AND S.surgeryNo = O.surgeryNo AND PR.petNo = P.petNo AND P.ownerNo = O.ownerNo AND M.medNo = ‘J. Smith’ AND adminMethod = ‘Oral’ AND S.surgeryNo = 100;
Computer Science & Information Technology