This Oracle mock test assesses knowledge of SQL commands, data manipulation, and database management concepts. It includes questions on SQL functions, joins, and limitations, catering to learners aiming to enhance their Oracle database skills.
SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < ’21-JAN-2001’ ORDER BY purchase_date;
SELECT book_title FROM books WHERE price IN (500,900) AND purchase_date < ’21-JAN-2001’ ORDER BY purchase date ASC;
. SELECT book_title FROM books WHERE price < 500 or > 900 AND purchase_date < ’21-JAN-2001’ ORDER BY purchase date DESC;
SELECT book_title FROM books WHERE (price < 500 OR price > 900) AND purchase_date < ’21-JAN-2001’ ORDER BY purchase date DESC;
Rate this question:
You want all unmatched data from one table.
You want all matched data from both tables.
You want all unmatched data from both tables
One of the tables has more data than other.
Rate this question:
BFILE
BLOB
CLOB
LONG RAW
Rate this question:
=
LIKE
NOT IN
BETWEEN
IS
Rate this question:
SQL cannot support object-orientation
The same query can be written in many ways, each with vastly different execution plans.
SQL syntax is too difficult for non-computer professionals to use
SQL creates excessive locks within the Oracle database
Rate this question:
SELECT last_name FROM EMP WHERE last_name LIKE'_A%;
SELECT last_name FROM EMP WHERE last name='*A%
SELECT last_name FROM EMP WHERE last name ='* _A%;
SELECT last_name FROM EMP WHERE last name LIKE '* a%
Rate this question:
INSERT INTO employees VALUES ( NULL, ‘John’,‘Smith’);
INSERT INTO employees( first_name, last_name) VALUES(‘John’,‘Smith’);
INSERT INTO employees VALUES (‘1000’,‘John’,NULL);
INSERT INTO employees(first_name,last_name, employee_id) VALUES ( 1000, ‘John’,‘Smith’);
. INSERT INTO employees (employee_id) VALUES (1000);
INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, ‘John’,‘’);
Rate this question:
SELECT last_name, manager_id, department_name FROM employees e FULL OUTER JOIN departments d ON (e.department_id = d.department_id);
SELECT e.last_name, m.last_name, department_name FROM employees e LEFT OUTER JOIN employees m on ( e.manager_id = m.employee_id) LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);
SELECT e.last_name, m.last_name, department_name FROM employees e RIGHT OUTER JOIN employees m on ( e.manager_id = m.employee_id) LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);
SELECT e.last_name, m.last_name, department_name FROM employees e LEFT OUTER JOIN employees m on ( e.manager_id = m.employee_id) RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);
SELECT e.last_name, m.last_name, department_name FROM employees e RIGHT OUTER JOIN employees m on ( e.manager_id = m.employee_id) RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);
SELECT last_name, manager_id, department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id) ;
Rate this question:
True
False
Rate this question:
DROP
COMMIT
ROLLBACK
DELETE
SAVEPOINT
Rate this question:
SELECT dear customer, customer_name, FROM customers;
SELECT "Dear Customer", customer_name || ',' FROM customers;
SELECT 'Dear Customer ' || customer_name ',' FROM customers;
SELECT 'Dear Customer ' || customer_name || ',' || FROM customers;
SELECT 'Dear Customer ' || customer_name || ',' || FROM customers;
SELECT 'Dear Customer ' || customer_name || ',' FROM customers;
Rate this question:
A DDL command and can be rolled back
A DDL command and cannot be rolled back
A TCL command and can be rolled back
A DML command and cannot be rolled back
Rate this question:
SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary)
SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);
SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);
SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);
SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);
SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department.id);
Rate this question:
Use the ALTER TABLE command with the ADD clause on the EMP table.
Use the ALTER TABLE command with the ADD clause in the DEPT table.
Use the ALTER TABLE command with the MODIFY clause on the DEPT table.
Use the ALTER TABLE command with the MODIFY clause on the EMP table.
This task cannot be accomplished
Rate this question:
46 and 45.93
50 and 45.93
50 and 45.9
46 and 45
45.95 and 46
Rate this question:
ALTER TABLE table_name DROP PRIMARY KEY CASCADE;
ALTER TABLE table_name DISABLE CONSTRAINT PRIMARY KEY CASCADE;
ALTER TABLE table_name REMOVE CONSTRAINT PRIMARY KEY CASCADE;
A PRIMARY KEY constraint CANNOT be removed if it has dependent constraints.
Rate this question:
Create groups of data
Sort data in a specific order
Retrieve data based on an unknown condition
Convert data to a different format
Rate this question:
Create a view in any scheme
Create a view in your schema
Create a view only if it is based on tables that you created
Create a view that is accessible by everyone
Create a table view
Rate this question:
Must be aggregate functions only
Must also appear in the GROUP BY clause
Must also appear in the GROUP BY and HAVING clauses
Rate this question:
Convert 10 to 'TEN'
Convert 10 to '10'
Convert '10' to 10
Convert a date to a character expression
Convert a character expression to a date
Rate this question:
The statement produces an error at line 1.
The statement produces an error at line 3.
The statement produces an error at line 6.
The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.
The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company
Rate this question:
SELECT customer_id, order_id, order_total FROM orders HAVING order total BETWEEN 100 and 2000
SELECT customer_id, order_id, order_total FROM orders WHERE order_total BETWEEN 100 and 2000
SELECT customer_id, order_id, order _total FROM orders WHERE order_total>= 100 and order_total
SELECT customer_id, order_id, order_total FROM orders WHERE order_total >= 100 and
Rate this question:
String
Character
Integer
Date
Translation
Conversion
Calendar
Numeric
Rate this question:
All data in the table is deleted, and the table structure is also deleted.
All data in the table is deleted, but the structure of the table is retained.
All indexes based on the DEPT table are dropped.
All synonyms based on the DEPT table are deleted
All views based on the DEPT table are deleted.
Rate this question:
SELECT last_name FROM employees WHERE last_name LIKE '%A\_B%' ESCAPE '\';
SELECT last_name FROM employees WHERE last_name LIKE 'A_B%' ESCAPE '%';
SELECT last_name FROM employees WHERE last_name LIKE '%A_B%' ESCAPE ;
SELECT last_name FROM employees WHERE last_name LIKE '%A\_B%' ESCAPE '\\';
Rate this question:
ALTER TABLE student ADD CONSTRAINT name(NOT NULL);
ALTER TABLE student ADD CONSTRAINT NOT NULL (name);
ALTER TABLE student MODIFY CONSTRAINT name(NOT NULL);
ALTER TABLE student MODIFY(name varcher2(25) NOT NULL);
Rate this question:
To_numbert()
Sinh()
Sqrt()
Round()
Rate this question:
Select last name, first name. FROM emp WHERE last name= ‘smith’;
Select last name, first name. FROM emp WHERE UPPER (last name)= ‘smith’;
Select last name, first name. FROM emp WHERE last name=UPPER (‘smith’);
Select last name, first name. FROM emp WHERE LOWER (last name)= ‘smith’;
Rate this question:
ALTER TABLE student_grades ADD CONSTRAINT NAME=student_id_fk FOREIGN KEY (student_id) REFERENCES student(student_id);
ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 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.