Tag: databases

Questions Related to databases

  1. USER_TABLESPACES

  2. V$TABLESPACE

  3. DBA_TABLESPACE_GROUPS

  4. DBA_TABLESPACES


Correct Option: D
  1. Statement failure

  2. User process failure

  3. Network failure

  4. Instance failure


Correct Option: B

What conditions have to be met before dropping a tablespace?

  1. The tablespace must be offline

  2. The tablespace must be online

  3. The tablespace cannot have active segments

  4. The administrator NOT needs the correct system privilege


Correct Option: C

Which of the following events can be used to fire triggers?

  1. sysdate

  2. Truncate

  3. avg

  4. To_date


Correct Option: B

Which names are NOT appropriate database object names?

  1. "SELECT"

  2. "_Marketing"

  3. m364DaYs

  4. SELECT


Correct Option: D

Which of the following queries can you use to search for employees with the pattern 'A_B' in their names?

  1. SELECT last_name FROM employees WHERE last_name LIKE '%A_B%' ESCAPE '\';

  2. SELECT last_name FROM employees WHERE last_name LIKE '%A_B%' ESCAPE;

  3. SELECT last_name FROM employees WHERE last_name LIKE 'A_B%' ESCAPE '%';

  4. SELECT last_name FROM employees WHERE last_name LIKE '%A_B%' ESCAPE '\';


Correct Option: D

To write a query that performs an outer join of tables A and B and returns all rows from B, You need to write

  1. any outer join

  2. a left outer join

  3. a cross join

  4. a right outer join


Correct Option: D

AI Explanation

To answer this question, you need to understand the concept of outer joins.

An outer join is used to combine records from two tables, even if there is no match between the columns being joined. There are three types of outer joins: left outer join, right outer join, and full outer join.

In this case, the question asks for a query that returns all rows from table B. To achieve this, you need to perform a right outer join.

Option A) Any outer join - This option is incorrect because it is too general and does not specify the type of outer join required.

Option B) Left outer join - This option is incorrect because a left outer join would return all rows from table A, not table B.

Option C) Cross join - This option is incorrect because a cross join returns the Cartesian product of the two tables, which is not what the question asks for.

Option D) Right outer join - This option is correct because a right outer join combines all rows from table B, even if there is no match in table A.

Therefore, the correct answer is D) a right outer join.

15 Examine the description of the STUDENTS table: STD_ID NUMBER (4) COURSE_ID VARCHAR2 (10) START_DATE DATE END_DATE DATE Which two aggregate functions are valid on the START_DATE column? (Choose two)

  1. SUM(start_date)

  2. AVG(start_date)

  3. COUNT(start_date)

  4. MIN(start_date)


Correct Option: C,D

You would like to display the system date in the format "Monday, 01 June, 2001". Which SELECT statement should you use?

  1. SELECT TO_DATE (SYSDATE, 'FMDAY, DD Month, YYYY') FROM dual;

  2. SELECT TO_CHAR (SYSDATE, 'FMDD, DY Month, YYYY') FROM dual;

  3. SELECT TO_CHAR (SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;

  4. SELECT TO_CHAR (SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;


Correct Option: C
  1. DELETE employees;

  2. DESCRIBE employees;

  3. ROLLBACK TO SAVEPOINT C;

  4. ALTER TABLE employees SET UNUSED COLUMN sal;

  5. GRANT SELECT ON employees TO SCOTT;


Correct Option: C,D