Knowee
Questions
Features
Study Tools

The following view statements contain the name, job title and the annual salary of employees working in the department 20: (Choose the correct)Select one:a.create view DEPT20 isselect ENAME, JOB, SAL*12 ANNUAL SALARY from EMPwhere DEPTNO = 20;b.create view DEPT20 asselect ENAME, JOB, SAL*12 ANNUAL SALARY from EMPwhere DEPTNO <> 20;c.create view DEPT20 asselect ENAME, JOB, SAL*12 ANNUAL SALARY from EMPwhere DEPTNO = 20;

Question

The following view statements contain the name, job title and the annual salary of employees working in the department 20: (Choose the correct)Select one:a.create view DEPT20 isselect ENAME, JOB, SAL12 ANNUAL SALARY from EMPwhere DEPTNO = 20;b.create view DEPT20 asselect ENAME, JOB, SAL12 ANNUAL SALARY from EMPwhere DEPTNO <> 20;c.create view DEPT20 asselect ENAME, JOB, SAL*12 ANNUAL SALARY from EMPwhere DEPTNO = 20;

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct statement is:

c. create view DEPT20 as select ENAME, JOB, SAL*12 ANNUAL SALARY from EMP where DEPTNO = 20;

This statement creates a view named DEPT20 that selects the employee name (ENAME), job title (JOB), and annual salary (SAL*12) from the EMP table where the department number (DEPTNO) is 20. The other statements are incorrect because they either use the wrong syntax (option a) or select employees from departments other than 20 (option b).

This problem has been solved

Similar Questions

Question 2Which of the following SQL statements will create a view that lists the job name and minimum and maximum salaries for jobs with a pay range of 50000 to 100000?1 pointCREATE VIEWAS SELECT JOB_TITLE, MIN_SALARY, MAX_SALARY FROM JOBSWHERE MIN_SALARY > 50000 AND MAX_SALARY < 100000;CREATE VIEW JobSalaryRanges(Job, StartingSalary, MaximumSalary)AS SELECT JOB_TITLE, MIN_SALARY, MAX_SALARY FROM JOBSWHERE SALARY > 50000 AND SALARY < 100000;CREATE VIEW JobSalaryRanges(Job, StartingSalary, MaximumSalary)AS SELECT JOB_TITLE, MIN_SALARY, MAX_SALARY FROM JOBSWHERE MIN_SALARY > 50000 AND MAX_SALARY < 100000;CREATE VIEW JobSalaryRanges(Job, StartingSalary, MaximumSalary)FROM JOBSWHERE MIN_SALARY > 50000 AND MAX_SALARY < 100000;

Write query for the following.employee(id,name,salary,address)department(d_id,d_name,id)(1) Create a view department_details of department table.(2) To join two existing tables using inner join.(3) To drop a view

Write queries for the following.Employee ( EID, Name, Age, Salary)Department ( DID, D_Name, EID,Country)(1) Create a view Emp_India which contains the name, age and salary of Indianemployees.(2) Display the name of employee in descending order whose Country starts with ‘I’

Which of the following SQL statements will create a view named EMP_VIEW with an employee’s First name, last name, and ID, based on the EMPLOYEES tables?1 pointCREATE VIEW EMP_VIEW (EMP_ID, FIRSTNAME, LASTNAME)AS SELECT EMP_ID, F_NAME, L_NAMEFROM EMPLOYEES; CREATE VIEW EMP_VIEW (EMP_ID, FIRSTNAME, LASTNAME)FROM EMPLOYEES; CREATE VIEW EMP_VIEW (EMP_ID, FIRSTNAME, LASTNAME)AS SELECT EMP_ID, F_NAME, L_NAME;NEW VIEW EMP_VIEW (EMP_ID, FIRSTNAME, LASTNAME)AS SELECT EMP_ID, F_NAME, L_NAMEFROM EMPLOYEES;

Which of the following SQL statements will create a view that lists only the employees in department number 7?1 pointCREATE VIEW EMP_VIEW (EMP_ID, FIRSTNAME, LASTNAME)AS SELECT EMP_ID, F_NAME, L_NAMEFROM EMPLOYEES WHERE DEP_ID = 7;CREATE VIEW EMP_VIEW (EMP_ID, FIRSTNAME, LASTNAME)AS SELECT EMP_ID, F_NAME, L_NAMEWHERE DEP_ID = 7;CREATE VIEW EMP_VIEW (EMP_ID, FIRSTNAME, LASTNAME)AS SELECT EMP_ID, F_NAME, L_NAMEFROM EMPLOYEES IF DEP_ID = 7;CREATE VIEW EMP_VIEW (EMP_ID, FIRSTNAME, LASTNAME)WHERE DEP_ID = 7AS SELECT EMP_ID, F_NAME, L_NAMEFROM EMPLOYEES;

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.