0

databases Online Quiz - 131

Description: databases Online Quiz - 131
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

What part of a databse trigger determine the number of times the trigger body excutes?

  1. Trigger type

  2. Trigger body

  3. Trigger event

  4. Trigger timing


Correct Option: C

If the below block, when you execute then what will be the output? Begin Null; Exception When others then Dbms_output.put_line(‘ I am in Others Exception’); When no_data_found then Dbms_output.put_line(‘ I am in no data found Exception’); End;

  1. I am in Others Exception

  2. I am in no data found Exception

  3. Compilation Error

  4. None of the above


Correct Option: C

What are the different methods for passing parameters to Procedure?

  1. Positional & Named

  2. Positional alone

  3. Positional ,Name and Combination

  4. None of the above


Correct Option: C

How can you find within a PL/SQL block, if a cursor is open?

  1. %OPEN

  2. %ISOPEN

  3. 1 & 2

  4. None of the above


Correct Option: B

What is the use of %ROWTYPE in PL/SQL?

  1. %ROWTYPE allows you to associate a variable with an entire table row

  2. %ROWTYPE associates a variable with a single column type

  3. Both of the above

  4. None of the above


Correct Option: A

I have just now created sequence abc and If you immediately run the below select statement , what is the output? CREATE SEQUENCE abc MINVALUE 1 MAXVALUE 10 START WITH 1 INCREMENT BY 1 CACHE 20 Select abc.currval from dual;

  1. 1

  2. Null

  3. Error

  4. None of the above


Correct Option: C

What is the maximum number of columns in table or view in Oracle?

  1. 900

  2. 1000

  3. 1100

  4. 1050


Correct Option: B

What are the Sql Cursor Attributes in Pl/sql?

  1. SQL%ROWCOUNT, SQL%ISFOUND,SQL%NOTFOUND,SQL%ISOPEN

  2. SQL%ROWCOUNT, SQL%FOUND,SQL%NOTFOUND,SQL%OPEN

  3. SQL%ROWCOUNT, SQL%FOUND,SQL%NOTFOUND,SQL%ISOPEN

  4. All of the above


Correct Option: C

Raw types are used to store _________ data.

  1. binary

  2. Character

  3. ASCII

  4. All of the above


Correct Option: A

SQL has facility for programmed handling of errors that arise during the manipulation of data.

  1. True

  2. False


Correct Option: B

_________ data type stores unstructured binary data upto 4GB length.

  1. CLOB

  2. BLOB

  3. LONG

  4. All of the above


Correct Option: B

In a PL/SQL block structure, which parts are optional?

  1. DELCARE and BEGIN

  2. DECALRE and EXCEPTION

  3. EXCEPTION and END

  4. BEGIN and END


Correct Option: B

Under which two circumstances do you design database triggers? (Choose two)

  1. To duplicate the functionality of other triggers.

  2. To replicate built-in constraints in the Oracle server such as primary key and foreign key.

  3. To guarantee that when a specific operation is performed, related actions are performed.

  4. For centralized, global operations that should be fired for the triggering statement, regardless of which user or application issues the statement.


Correct Option: C,D

Which of the following are not operators you can use in a math formula within a SQL statement?

  1. +

  2. (

  3. ]

  4. /


Correct Option: C

What is the proper syntax for assigning a column alias?

  1. SELECT column_name ALIAS alias_name FROM table_name;

  2. SELECT column_name alias_name FROM table_name;

  3. SELECT alias_name FROM table_name;

  4. ASSIGN alias_name TO column_name;


Correct Option: B

Which of the following are reasonable series of transaction-control commands?

  1. Insert some records, COMMIT, ROLLBACK

  2. SAVEPOINT, insert some records, ROLLBACK, ROLLBACK, COMMIT

  3. ROLLBACK, insert some records, COMMIT

  4. ROLLBACK, insert some records, COMMIT, COMMIT


Correct Option: C

Which of the following shows the wildcards for a single character and multiple characters, respectively?

  1. ?, *

  2. _, %

  3. ?, _

  4. *, %


Correct Option: B

Which statement below is true?

  1. ROUND(4.5, 0) < TRUNC(4.5, 0)

  2. ROUND(4.1, 0) < TRUNC(4.2, 0

  3. ROUND(8.9, 0) > TRUNC(8.9, 0)

  4. ROUND(8.9, 1) > TRUNC(8.95, 2)


Correct Option: C

AI Explanation

To answer this question, we need to understand the difference between the ROUND and TRUNC functions in mathematics.

The ROUND function rounds a number to a specified number of decimal places or to the nearest whole number. The TRUNC function, on the other hand, truncates a number by removing the decimal part without rounding.

Let's go through each option to determine which one is true:

Option A) ROUND(4.5, 0) < TRUNC(4.5, 0) - This option is incorrect because both ROUND(4.5, 0) and TRUNC(4.5, 0) will result in 5. Therefore, the inequality is false.

Option B) ROUND(4.1, 0) < TRUNC(4.2, 0) - This option is incorrect because both ROUND(4.1, 0) and TRUNC(4.2, 0) will result in 4. Therefore, the inequality is false.

Option C) ROUND(8.9, 0) > TRUNC(8.9, 0) - This option is correct because ROUND(8.9, 0) will result in 9, while TRUNC(8.9, 0) will also result in 8. Therefore, the inequality is true.

Option D) ROUND(8.9, 1) > TRUNC(8.95, 2) - This option is incorrect because ROUND(8.9, 1) will result in 8.9, while TRUNC(8.95, 2) will result in 8.95. Therefore, the inequality is false.

The correct answer is option C. This option is correct because ROUND(8.9, 0) is greater than TRUNC(8.9, 0).

A trigger is a special type of stored procedure that is executed by the SQL Server when an Insert, Modify or Delete operation is performed Against a given table.

  1. True

  2. False


Correct Option: A

Stored procedures are the way to create routines and procedures that are run on the server.

  1. True

  2. False


Correct Option: A
- Hide questions