SQL Quiz-2 by 'The Cloud9' assesses advanced SQL skills through practical questions on table structures, data manipulation, and procedural SQL. It's designed for learners to enhance their database management capabilities.
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);
CREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_id;
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;
Rate this question:
Immediately after the SELECT clause
Before the WHERE clause
Before the FROM clause
After the ORDER BY clause
After the WHERE clause
Rate this question:
FOR EACH ROW trigger on the EMP table.
Statement-level trigger on the EMP table.
FOR EACH ROW trigger on the AUDIT_TABLE table.
Statement-level trigger on the AUDIT_TABLE table.
Rate this question:
UPDATE new_employees SET name = (Select last_name|| first_name FROM employees Where employee_id =180) WHERE employee_id =180;
UPDATE new_employees SET name = (SELECT last_name||first_name FROM employees) WHERE employee_id =180;
UPDATE new_employees SET name = (SELECT last_name|| first_name FROM employees WHERE employee_id =180) WHERE employee_id =(SELECT employee_id FROM new employees);
UPDATE new_employees SET name = (SELECT last name|| first_name FROM employees WHERE employee_id= (SELECT employee_id FROM new_employees)) WHERE employee_id =180;
Rate this question:
Both tables have NULL values.
You want all unmatched data from one table.
You want all matched data from both tables.
You want all unmatched data from both tables.
You want all matched and unmatched data from only one table.
Rate this question:
SYS privileges
Your privileges
Public privileges
User A’s privileges
Rate this question:
SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) < 5000 AND MAX(salary) < 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
Rate this question:
SELECT AVERAGE(gpa) FROM student_grades WHERE semester_end > ’01-JAN-2000’ and semester end < 31-DEC-2000’;
SELECT COUNT(gpa) FROM student grades WHERE semester_end > ’01-JAN-2000’ and semester end < ’31-DEC-2000’;
SELECT AVG(gpa) FROM student_grades
SELECT MEDIAN(gpa) FROM student_grades WHERE semester end > ’01-JAN-2000’ and semester end < ’31-DEC-2000’;
Rate this question:
You need to execute the command CALCTAX(1000);.
You need to execute the command EXECUTE FUNCTION calctax;.
You need to create a SQL *Plus environment variable X and issue the command :X := CALCTAX(1000);.
You need to create a SQL *Plus environment variable X and issue the command EXECUTE :X := CALCTAX;
You need to create a SQL *Plus environment variable X and issue the command EXECUTE :X := CALCTAX(1000);
Rate this question:
Packages can be nested.
You can pass parameters to packages.
You can pass parameters to packages.
The contents of packages can be shared by many applications.
You can achieve information hiding by making package constructs private.
Rate this question:
Add_dept;
Add_dept(‘Accounting’);
Add_dept(, ‘New York’);
Add_dept(p_location=>’New York’);
Rate this question:
Cursor
Constant
Trigger
Sequence
View
Rate this question:
EXECUTE INSERT_TEAM;
EXECUTE INSERT_TEAM(3, V_NAME=>’LONGHORNS’, V_CITY=>’AUSTIN’);
EXECUTE INSERT_TEAM(3, ‘AUSTIN’,’LONGHORNS’);
EXECUTE INSERT_TEAM (V_ID := V_NAME := ‘LONGHORNS’, V_CITY := ‘AUSTIN’);
EXECUTE INSERT_TEAM (3, ‘LONGHORNS’);
Rate this question:
A specific error or any errors occurs.
A database is shut down or started up.
A specific user or any user logs on or off.
A user executes a CREATE or an ALTER table statement.
A user executes a SELECT statement with an ORDER BY clause.
A user executes a JOIN statement that uses four or more tables.
Rate this question:
If errors occur during the compilation of a trigger, the trigger is still created.
If errors occur during the compilation of a trigger you can go into SQL *Plus and query the USER_TRIGGERS data dictionary view to see the compilation errors.
If errors occur during the compilation of a trigger you can use the SHOW ERRORS command within iSQL *Plus to see the compilation errors.
If errors occur during the compilation of a trigger you can go into SQL *Plus and query the USER_ERRORS data dictionary view to see compilation errors.
Rate this question:
Quiz Review Timeline (Updated): Mar 20, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.