Tag: databases

Questions Related to databases

  1. Indexes

  2. tables

  3. public synonyms

  4. triggers

  5. packages


Correct Option: C
  1. Group functions on columns ignore NULL values.

  2. Group functions on columns returning dates include NULL values

  3. Group functions on columns returning numbers include NULL values.

  4. Group functions on columns cannot be accurately used on columns that contain NULL values.


Correct Option: A
Explanation:

To answer this question, the user needs to understand the behavior of group functions when used on columns that contain NULL values.

Option A is correct. Group functions ignore NULL values in columns. For example, the AVG function calculates the average of all non-NULL values, while the COUNT function counts all non-NULL values. This means that NULL values are not included in the calculation and do not affect the result.

Option B and Option C are incorrect because they describe the behavior of specific group functions, rather than the behavior of group functions in general. The behavior of each group function depends on the specific function being used and the data type of the column being aggregated.

Option D is incorrect because group functions can be accurately used on columns that contain NULL values. However, it is important to keep in mind that NULL values may affect the result of certain operations, such as the SUM function. If a column contains both NULL and non-NULL values, the SUM function will return a NULL value, unless the column is aggregated using the NVL function or a similar function that replaces NULL values with a default value.

Therefore, the correct answer is:

The Answer is: A. Group functions on columns ignore NULL values.

  1. USER_OBJECTS

  2. USER_PROCEDURES

  3. USER_PROCS

  4. USER_PLSQL_UNITS


Correct Option: A
  1. CREATE OR REPLACE PROCEDURE <> as

  2. CREATE OR REPLACE PROCEDURE <>(Parameter list) as

  3. CREATE OR REPLACE PROCEDURE <> is

  4. All of the above


Correct Option: D
  1. When a parameter is passed as an IN variable it is passed by reference

  2. When variables are passed in OUT or INOUT mode it is pass by value

  3. The NOCOPY clause tells to PL/SQL engine to pass the variable by reference

  4. All of the above


Correct Option: D
  1. Use the DBMS_MANAGE_LOB.MIGRATE procedure

  2. Use the UTL_MANAGE_LOB.MIGRATE procedure.

  3. Use the ALTER TABLE command

  4. You cannot migrate from a LONG to a LOB date type for a column


Correct Option: C
  1. FOR EACH ROW trigger on the EMP table.

  2. Statement-level trigger on the EMP table.

  3. FOR EACH ROW trigger on the AUDIT_TABLE table.

  4. Statement-level trigger on the AUDIT_TABLE table.


Correct Option: A