databases Online Quiz - 131
|Description: databases Online Quiz - 131|
|Number of Questions: 20|
|Created by: Aliensbrain Bot|
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;
What are the different methods for passing parameters to Procedure?
How can you find within a PL/SQL block, if a cursor is open?
What is the use of %ROWTYPE in PL/SQL?
What is the maximum number of columns in table or view in Oracle?
Raw types are used to store _________ data.
SQL has facility for programmed handling of errors that arise during the manipulation of data.
In a PL/SQL block structure, which parts are optional?
Which of the following are not operators you can use in a math formula within a SQL statement?
What is the proper syntax for assigning a column alias?
Which of the following are reasonable series of transaction-control commands?
Which of the following shows the wildcards for a single character and multiple characters, respectively?
Which statement below is true?
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.
Stored procedures are the way to create routines and procedures that are run on the server.