I use Apex oracle SQL 1). Write a SQL query that will select the department numb
ID: 3888518 • Letter: I
Question
I use Apex oracle SQL
1). Write a SQL query that will select the department number and department name from the dept table. You will have to do a DESCRIBE on the dept table to get the actual spelling of the columns.
2. Write a SQL query that will select the employee number, employee name and job from the emp table.
3. Write a SQL query using the emp table that will return only the employees that have ‘CLERK’ as their job. The columns to be included in the select are: the employee number, employee name and job.
4. Write SQL query using the emp table that shows only the employees that have a salary greater than 1250. The columns to be included in the select are: the employee number, employee name, job and salary.
Explanation / Answer
column names are not clearly mentioned in question, since column name cannot have a space, I have used '_' as conjunction.
1. DESC dept;
select department_number, department_name from dept;
2. select employee_number, employee_name, job from emp;
3. select employee_number, employee_name, job from emp where job = 'CLERK';
4. select employee_number, employee_name, job, salary from emp where salary > 1250;