Tag: databases

Questions Related to databases

What is true about MERGE command? Choose all that apply.

  1. It is a DML command

  2. It is a DDL command

  3. Provides the ability to conditionally update or insert data into a database table

  4. Provides the ability to MERGE VIEWS and INDICES of a TABLE


Correct Option: A,C

Select TYPES of JOINS. Choose all that apply.

  1. EQUI-JOIN

  2. NONEQUI-JOIN

  3. SELF-JOIN

  4. OUTER-JOIN

  5. MERGE-JOIN

  6. TRANSACTION-JOIN


Correct Option: A,B,C,D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) EQUI-JOIN - This option is correct. An EQUI-JOIN is used to combine rows from two or more tables based on a related column between them.

Option B) NONEQUI-JOIN - This option is correct. A NONEQUI-JOIN is used to combine rows from two or more tables based on a condition that is not an equality.

Option C) SELF-JOIN - This option is correct. A SELF-JOIN is used to join a table to itself, treating it as two separate tables.

Option D) OUTER-JOIN - This option is correct. An OUTER-JOIN is used to combine rows from two or more tables, including unmatched rows from one or both tables.

Option E) MERGE-JOIN - This option is incorrect. A MERGE-JOIN is not a type of join. It is a technique used in query optimization to merge sorted data sets.

Option F) TRANSACTION-JOIN - This option is incorrect. A TRANSACTION-JOIN is not a type of join. It does not exist in the context of SQL joins.

The correct answer is A, B, C, and D. These options are correct because they represent different types of joins commonly used in SQL queries.

  1. SELECT

  2. WHERE

  3. GROUP BY

  4. FROM

  5. ORDER BY

  6. HAVING


Correct Option: A,D

ALIAS can be used for TABLE as well as COLUMN to simplify interpretation of SQL query

  1. True

  2. False


Correct Option: A

Identify the correct output select INITCAP('ORACLE BASICS') from dual;

  1. ORACLE BASICS

  2. Oracle Basics

  3. oracle basics

  4. oracleBasics


Correct Option: B
  1. ORACLE BASICS

  2. ORACLEBASICS

  3. oraclebasics

  4. oracleBasics


Correct Option: B

Identify the correct output --- select SUBSTR('ORACLE BASICS',-6,5) from dual;

  1. BASIC

  2. BASICS

  3. E BAS

  4. ORACL


Correct Option: A