Unit 2.2
The following view statements contain the name, job title and the annual salary of employees working in the department 20: (Choose the correct) or residing in
the city 'vizag
A.
B.
o create view DEPT20 is select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO = 20;
o create view DEPT20 as select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO 20;
create view DEPT20 as select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO = 20 or city='vizag';
o create view DEPT20 as select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO % 20;
Answers
Answered by
6
please mark me as brainlist
Answered by
0
Answer:
The correct option is C. create view DEPT20 as select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO = 20 or city='vizag';
Explanation:
- The correct syntax for a view statement is 'create view NAME as'
- It is given that the view statement contains information about the employees in department 20 or residing in city 'vizag'.
- So, the correct way to mention department 20 is DEPTNO = 20 and city is city = 'vizag'.
Explanation for incorrect options:
A. create view DEPT20 is select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO = 20;
- The syntax used is not right.
- It is written as 'create view DEPT20 is'. Instead, it should be 'create view DEPT20 as'.
B. create view DEPT20 as select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO 20;
- The equal to (=) sign after the DEPTNO is missing.
D. create view DEPT20 as select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO % 20;
- The equal to (=) sign after the DEPTNO is replaced by the modulo sign(%).
#SPJ3
Similar questions