Docsity

ORACLE DATABASE CERTIFICATION EXAM 2026/2027 COMPLETE CURRENT TESTING Q&A, Exams of Database Programming

Toggle sidebar
bg1
1
ORACLE DATABASE CERTIFICATION EXAM 2026/2027
COMPLETE CURRENT TESTING QUESTIONS AND
CORRECT ANSWERS WITH DETAILED RATIONALES.
ORACLE
Here is the 120-question practice exam for the Oracle Database Certification,
delivered in 6 batches of 20 questions. The content is aligned with the official exam
objectives for the Oracle Database SQL (1Z0-071), Oracle Database Administration I
(1Z0-082), and Oracle Database Program with PL/SQL (1Z0-149) certifications.
MULTIPLE CHOICE.
Batch 1: SQL Fundamentals — Retrieving, Restricting, and Sorting Data
(Questions 1–20)
1. Which SQL statement is used to retrieve data from a database?
A. GET
B. SELECT
C. OPEN
D. EXTRACT
Answer: B
Rationale: The SELECT statement is the fundamental SQL command used
to retrieve rows from one or more tables in a database. It is the most
commonly used DML (Data Manipulation Language) statement.
2. You need to display the first name and last name of all employees in a
single column, separated by a space. Which operator should you use?
A. +
B. ||
C. &
D. *
Answer: B
Rationale: The concatenation operator (||) is used in Oracle SQL to join two
or more strings together. For example, SELECT first_name || ' ' || last_name
FROM employees; produces a single column with the full name. The +
operator is for arithmetic, and & is for substitution variables.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download ORACLE DATABASE CERTIFICATION EXAM 2026/2027 COMPLETE CURRENT TESTING Q&A and more Exams Database Programming in PDF only on Docsity!

ORACLE DATABASE CERTIFICATION EXAM 2026/

COMPLETE CURRENT TESTING QUESTIONS AND

CORRECT ANSWERS WITH DETAILED RATIONALES.

ORACLE

Here is the 120-question practice exam for the Oracle Database Certification, delivered in 6 batches of 20 questions. The content is aligned with the official exam objectives for the Oracle Database SQL (1Z0-071), Oracle Database Administration I (1Z0-082), and Oracle Database Program with PL/SQL (1Z0-149) certifications. MULTIPLE CHOICE. Batch 1: SQL Fundamentals — Retrieving, Restricting, and Sorting Data (Questions 1–20)

  1. Which SQL statement is used to retrieve data from a database? A. GET B. SELECT C. OPEN D. EXTRACT Answer: B Rationale: The SELECT statement is the fundamental SQL command used to retrieve rows from one or more tables in a database. It is the most commonly used DML (Data Manipulation Language) statement.
  2. You need to display the first name and last name of all employees in a single column, separated by a space. Which operator should you use? A. + B. || C. & D. * Answer: B Rationale: The concatenation operator (||) is used in Oracle SQL to join two or more strings together. For example, SELECT first_name || ' ' || last_name FROM employees; produces a single column with the full name. The + operator is for arithmetic, and & is for substitution variables.
  1. Which clause is used to filter rows returned by a SELECT statement? A. ORDER BY B. GROUP BY C. WHERE D. HAVING Answer: C Rationale: The WHERE clause is used to restrict the rows returned by a query based on a specified condition. The ORDER BY clause sorts the results, GROUP BY aggregates rows, and HAVING filters grouped results.
  2. You need to display all employees whose last name starts with the letter 'S'. Which WHERE clause condition is correct? A. WHERE last_name = 'S%' B. WHERE last_name LIKE 'S%' C. WHERE last_name = 'S' D. WHERE last_name LIKE 'S' Answer: B Rationale: The LIKE operator is used for pattern matching. The percent sign (%) is a wildcard that matches any sequence of zero or more characters. LIKE 'S%' matches any last name beginning with 'S'.
  3. Which operator is used to test for NULL values in a column? A. = NULL B. != NULL C. IS NULL D. IS NOT NULL Answer: C Rationale: NULL cannot be compared using standard comparison operators (=, !=). The IS NULL operator is specifically designed to test whether a column value is NULL.
  4. You want to sort the result set by the hire_date column in descending order. Which clause is correct? A. SORT BY hire_date DESC B. ORDER BY hire_date DESC

values in specified columns into summary rows, allowing aggregate functions (SUM, AVG, COUNT, etc.) to be applied to each group.

  1. You want to find the average salary for each department. Which query is correct? A. SELECT department_id, AVG(salary) FROM employees GROUP BY department_id; B. SELECT department_id, AVG(salary) FROM employees ORDER BY department_id; C. SELECT department_id, AVG(salary) FROM employees WHERE department_id; D. SELECT department_id, AVG(salary) FROM employees HAVING department_id; Answer: A Rationale: To calculate an aggregate value for each group, the GROUP BY clause must be used with the aggregate function. The non-aggregated column (department_id) must be included in the GROUP BY clause.
  2. Which clause is used to filter the results of a GROUP BY query? A. WHERE B. HAVING C. ORDER BY D. FILTER Answer: B Rationale: The HAVING clause is used to filter groups produced by the GROUP BY clause. The WHERE clause filters individual rows before grouping, while HAVING filters groups after aggregation.
  3. What is the result of the expression 5 + NULL in Oracle SQL? A. 5 B. 0 C. NULL D. An error Answer: C Rationale: In SQL, any arithmetic operation involving NULL results in

NULL. This is a fundamental concept of NULL handling in Oracle Database.

  1. Which of the following is a valid column alias syntax? A. SELECT salary AS "Annual Salary" FROM employees; B. SELECT salary = "Annual Salary" FROM employees; C. SELECT salary IS "Annual Salary" FROM employees; D. SELECT salary TO "Annual Salary" FROM employees; Answer: A Rationale: Column aliases are created using the AS keyword (optional) or by simply specifying the alias after the column name. Double quotes are required if the alias contains spaces or special characters.
  2. You need to retrieve all unique job titles from the employees table. Which keyword should you use? A. UNIQUE B. DISTINCT C. DIFFERENT D. ONLY Answer: B Rationale: The DISTINCT keyword is used to eliminate duplicate rows from the result set. SELECT DISTINCT job_id FROM employees; returns each job ID only once.
  3. Which operator is used to combine multiple conditions in a WHERE clause? A. + B. AND C. CONCAT D. JOIN Answer: B Rationale: The AND operator is used to combine two or more conditions in a WHERE clause. All conditions must evaluate to TRUE for a row to be returned. The OR operator returns rows if any condition is TRUE.

B. DEFINE employee_name := 'John' C. DEFINE employee_name AS 'John' D. DEFINE employee_name TO 'John' Answer: A Rationale: The DEFINE command in SQL*Plus is used to create a user- defined variable. The syntax is DEFINE variable_name = value (for strings, the value should be enclosed in quotes).

  1. You execute the command DEFINE dept_name = 'Sales'. How would you reference this variable in a SQL statement? A. &dept_name B. :dept_name C. $dept_name D. @dept_name Answer: A Rationale: User-defined variables created with DEFINE are referenced using the ampersand (&) prefix. For example, SELECT * FROM departments WHERE department_name = '&dept_name';. BATCH 2: SQL Functions and Joins (Questions 21–40)
  2. Which function is used to convert a string to uppercase in Oracle SQL? A. UCASE() B. UPPER() C. TOUPPER() D. CAPS() Answer: B Rationale: The UPPER() function converts all characters in a string to uppercase. Related functions include LOWER() for lowercase and INITCAP() for capitalizing the first letter of each word.
  3. You need to find the length of a string in a column. Which function should you use? A. SIZE()

B. LENGTH()

C. COUNT()

D. WIDTH()

Answer: B Rationale: The LENGTH() function returns the number of characters in a string. For example, LENGTH('Hello') returns 5.

  1. Which function is used to round a number to a specified number of decimal places? A. ROUND() B. TRUNC() C. CEIL() D. FLOOR() Answer: A Rationale: The ROUND() function rounds a number to a specified number of decimal places. The TRUNC() function truncates a number without rounding.
  2. What is the result of TRUNC(15.79)? A. 16 B. 15 C. 15. D. 15. Answer: B Rationale: The TRUNC() function truncates a number to the specified number of decimal places (default is 0). TRUNC(15.79) returns 15, as it simply removes the decimal portion without rounding.
  3. Which function returns the remainder of a division operation? A. DIV() B. MOD() C. REM() D. REMINDER() Answer: B Rationale: The MOD() function returns the remainder of a division. For
  1. What is the result of TO_NUMBER('1234.56')? A. '1234.56' (as a string) B. 1234 (as a number) C. 1234.56 (as a number) D. An error Answer: C Rationale: The TO_NUMBER() function converts a character string to a numeric value. TO_NUMBER('1234.56') returns the number 1234.56.
  2. Which of the following is a valid date function in Oracle SQL? A. GETDATE() B. SYSDATE C. CURRENTDATE() D. TODAY() Answer: B Rationale: SYSDATE is a pseudo-column that returns the current date and time of the database server. It is commonly used in date arithmetic and functions.
  3. Which type of join returns all rows from both tables, including unmatched rows? A. INNER JOIN B. LEFT OUTER JOIN C. RIGHT OUTER JOIN D. FULL OUTER JOIN Answer: D Rationale: A FULL OUTER JOIN returns all rows from both tables. If there is no match, NULL values are returned for the columns of the table that lacks a matching row.
  4. You need to join the employees table with the departments table to display the department name for each employee. Which type of join is most appropriate? A. CROSS JOIN B. NATURAL JOIN

C. SELF JOIN

D. INNER JOIN

Answer: D Rationale: An INNER JOIN (or simply JOIN) returns only the rows that have matching values in both tables. Joining employees and departments on department_id returns employees with their corresponding department names.

  1. What is a self join? A. A join between a table and itself B. A join between two different tables C. A join that uses the NATURAL keyword D. A join that returns all rows Answer: A Rationale: A self join is a join in which a table is joined with itself. This is useful for comparing rows within the same table, such as finding employees who earn more than their managers.
  2. What is the result of a Cartesian product? A. Only matching rows from both tables B. All rows from the left table only C. Every row from one table combined with every row from the other table D. An error Answer: C Rationale: A Cartesian product (CROSS JOIN) is produced when a join condition is omitted or invalid. It returns the number of rows in the first table multiplied by the number of rows in the second table.
  3. You want to display all employees, including those who are not assigned to a department. Which join should you use? A. INNER JOIN B. LEFT OUTER JOIN C. RIGHT OUTER JOIN D. CROSS JOIN

Answer: D Rationale: The UNION operator returns all distinct rows from both queries, eliminating duplicates. UNION ALL returns all rows, including duplicates.

  1. You need to find the job IDs that exist in the employees table but not in the job_history table. Which set operator should you use? A. UNION B. INTERSECT C. MINUS D. UNION ALL Answer: C Rationale: The MINUS operator returns rows from the first query that are not present in the second query. It is used for set difference operations.
  2. What is the result of SELECT 1 FROM dual UNION SELECT 1 FROM dual? A. Two rows B. One row C. No rows D. An error Answer: B Rationale: The UNION operator removes duplicate rows. Since both queries return the same value (1), the result set contains only one row. The DUAL table is a special one-row, one-column table used for evaluating expressions. BATCH 3: Subqueries, DML, and DDL (Questions 41–60)
  3. What is a subquery? A. A query nested inside another SQL statement B. A query that returns multiple columns C. A query that uses the JOIN clause D. A query that modifies data

Answer: A Rationale: A subquery is a SELECT statement nested within another SQL statement (such as SELECT, INSERT, UPDATE, DELETE, or another subquery). Subqueries are used to return data that will be used by the main query.

  1. Which operator is used to compare a value with the result of a multiple-row subquery? A. = B. > C. IN D. < Answer: C Rationale: The IN operator is used with multiple-row subqueries to test whether a value matches any value in the subquery's result set. Single- row operators (=, >, <) can only be used with single-row subqueries.
  2. You need to find all employees who earn more than the average salary. Which query is correct? A. SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees); B. SELECT * FROM employees WHERE salary > AVG(salary); C. SELECT * FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees); D. SELECT * FROM employees HAVING salary > (SELECT AVG(salary) FROM employees); Answer: A Rationale: A single-row subquery (using AVG) is enclosed in parentheses and used with a single-row operator (>). Option B is invalid because aggregate functions cannot be used directly in a WHERE clause.
  3. What is a correlated subquery? A. A subquery that is executed once for the entire main query B. A subquery that references a column from the main query and is executed for each row

WHERE clause specifies which rows to delete. The DROP statement is a DDL command used to remove an entire table structure.

  1. What is the difference between DELETE and TRUNCATE? A. DELETE is DDL, TRUNCATE is DML B. DELETE can be rolled back, TRUNCATE cannot (in most cases) C. TRUNCATE can use a WHERE clause D. DELETE is faster than TRUNCATE Answer: B Rationale: DELETE is a DML statement that can be rolled back and can include a WHERE clause. TRUNCATE is a DDL statement that removes all rows from a table without logging individual row deletions, and cannot be rolled back in most cases.
  2. Which statement is used to create a new table in the database? A. CREATE TABLE B. ALTER TABLE C. DROP TABLE D. NEW TABLE Answer: A Rationale: The CREATE TABLE statement is a DDL (Data Definition Language) command used to create a new table in the database. It specifies the table name, column names, data types, and constraints.
  3. Which constraint ensures that a column cannot contain NULL values? A. UNIQUE B. PRIMARY KEY C. NOT NULL D. CHECK Answer: C Rationale: The NOT NULL constraint ensures that a column cannot contain NULL values. The PRIMARY KEY constraint also enforces NOT NULL, but it additionally enforces uniqueness.
  4. What is the purpose of a PRIMARY KEY constraint? A. To ensure that a column's values are unique across all rows and not NULL

B. To allow NULL values C. To create an index on the table D. To link two tables together Answer: A Rationale: A PRIMARY KEY constraint uniquely identifies each row in a table. It enforces both uniqueness and the NOT NULL constraint. A table can have only one primary key.

  1. Which statement is used to add a new column to an existing table? A. ALTER TABLE table_name ADD column_name data_type; B. ALTER TABLE table_name ADD COLUMN column_name data_type; C. UPDATE TABLE table_name ADD column_name data_type; D. MODIFY TABLE table_name ADD column_name data_type; Answer: A Rationale: The ALTER TABLE ... ADD statement is used to add a new column to an existing table. In Oracle SQL, the keyword COLUMN is optional.
  2. Which statement is used to remove a column from a table? A. ALTER TABLE table_name DROP COLUMN column_name; B. DELETE COLUMN column_name FROM table_name; C. REMOVE COLUMN column_name FROM table_name; D. DROP COLUMN column_name FROM table_name; Answer: A Rationale: The ALTER TABLE ... DROP COLUMN statement is used to remove a column from a table. This is a DDL operation that cannot be rolled back.
  3. What is a sequence in Oracle Database? A. A database object that generates unique numeric values B. A table that stores data C. A view that combines multiple tables D. An index that speeds up queries Answer: A Rationale: A sequence is a database object that generates a sequence of

C. NEW INDEX index_name ON table_name (column_name); D. ADD INDEX index_name ON table_name (column_name); Answer: A Rationale: The CREATE INDEX statement is used to create an index on one or more columns of a table. Indexes can be unique or non-unique.

  1. What is the purpose of a synonym in Oracle Database? A. To provide an alternative name for a database object B. To speed up queries C. To enforce data integrity D. To create a backup Answer: A Rationale: A synonym is an alias for a database object (table, view, sequence, procedure, etc.). It is commonly used to simplify object names and provide location transparency.
  2. Which statement is used to create a synonym? A. CREATE SYNONYM synonym_name FOR object_name; B. CREATE ALIAS synonym_name FOR object_name; C. CREATE NAME synonym_name FOR object_name; D. NEW SYNONYM synonym_name FOR object_name; Answer: A Rationale: The CREATE SYNONYM statement is used to create a synonym for a database object. This allows users to reference the object by a different name. BATCH 4: Database Architecture and Instance Management (Questions 61 – 80)
  3. What is the primary component of Oracle Database architecture that stores all data? A. The database buffer cache B. The shared pool

C. The data files D. The redo log files Answer: C Rationale: Data files are the physical files that store all the data in an Oracle Database. They are the primary storage component of the database. The buffer cache, shared pool, and redo logs are memory structures or files that support database operations.

  1. Which memory structure is part of the System Global Area (SGA)? A. Program Global Area (PGA) B. Database Buffer Cache C. User Global Area (UGA) D. Stack Space Answer: B Rationale: The Database Buffer Cache is a key component of the SGA. It caches data blocks read from data files, reducing the need for physical I/O. The PGA, UGA, and stack space are part of the Program Global Area (PGA).
  2. What is the purpose of the redo log files? A. To store the data of the database B. To record all changes made to the database for recovery purposes C. To store the database schema D. To store user credentials Answer: B Rationale: Redo log files record all changes made to the database (inserts, updates, deletes, and DDL operations). They are critical for instance recovery and media recovery in the event of a database failure.
  3. Which background process writes modified data from the buffer cache to the data files? A. LGWR (Log Writer) B. DBWn (Database Writer) C. SMON (System Monitor) D. PMON (Process Monitor)