0

databases Online Quiz - 157

Description: databases Online Quiz - 157
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. INSERT statement

  2. UPDATE statement

  3. Both of the Above

  4. None of the Above


Correct Option: C

MERGE statement

  1. Avoids separate updates

  2. ncreases performance and ease of use

  3. Is useful in data warehousing applications

  4. All of the above


Correct Option: D
  1. COMMIT or ROLLBACK

  2. A DDL or DCL statement executing

  3. USER exiting iSQL*Plus or System crash

  4. Any one of the above


Correct Option: D

Which is not a group function?

  1. Count

  2. Avg

  3. Total

  4. Max


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of group functions in SQL. Group functions are used to perform calculations on groups of rows rather than individual rows in a table.

Let's go through each option to understand why it is correct or incorrect:

Option A) Count - This option is a group function. It is used to count the number of rows that match a specific condition.

Option B) Avg - This option is a group function. It is used to calculate the average value of a column in a group of rows.

Option C) Total - This option is not a standard group function in SQL. The correct group function for calculating the total sum of a column is called "Sum". Therefore, option C is the correct answer to the question.

Option D) Max - This option is a group function. It is used to find the maximum value of a column in a group of rows.

The correct answer is C) Total. This option is not a group function in SQL, whereas the other options (A, B, and D) are valid group functions.

You can use Avg or Sum group functions for any numeric data

  1. True

  2. False


Correct Option: B

COUNT(DISTINCT expr) returns

  1. No. of rows in a table

  2. No. of rows with non-null values of the expr

  3. No. of distinct non-null values of the expr

  4. None of the above


Correct Option: C

Which function forces group functions to include null values?

  1. Group By

  2. NVL

  3. Order By

  4. Having


Correct Option: B

All columns in the SELECT list, that are not there in the GROUP function, should be in the Group By clause

  1. True

  2. False


Correct Option: B
  1. HAVING

  2. WHERE

  3. Order By

  4. Group by


Correct Option: A

We can use Group functions in the WHERE clause

  1. True

  2. False


Correct Option: B
  1. Numeric data

  2. Data type

  3. Char data

  4. None of the Above


Correct Option: A

You can update more than 1 row in a table with one update syntax

  1. True

  2. False


Correct Option: B

Delete from Employee where grade = ‘Y’” deletes

  1. All rows of the Employee table

  2. Rows of the Employee table where the set grade is ‘Y’

  3. Delete 1 row

  4. Nothing will be deleted


Correct Option: B
  1. CHECK keyword

  2. WITH CHECK keyword

  3. WITH CHECK OPTION keyword

  4. None of the Above


Correct Option: C

Explicit Defaults can be used in

  1. INSERT statement

  2. UPDATE statement

  3. Both of the Above

  4. None of the Above


Correct Option: C

MERGE statement

  1. Avoids separate updates

  2. ncreases performance and ease of use

  3. Is useful in data warehousing applications

  4. All of the above


Correct Option: D

Database transactions end with

  1. COMMIT or ROLLBACK

  2. A DDL or DCL statement executing

  3. USER exiting iSQL*Plus or System crash

  4. Any one of the above


Correct Option: D

In an Oracle Database, Locks are critical

  1. True

  2. False


Correct Option: B

Which is not a group function?

  1. Count

  2. Avg

  3. Total

  4. Max


Correct Option: C
- Hide questions