Tag: technology

Questions Related to technology

  1. a) %ROWTYPE

  2. b) %TYPE

  3. c) AS_COLUMN

  4. d) None 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

AI Explanation

To answer this question, we need to understand the concept of error handling in SQL.

Option A) True - This option is incorrect. SQL does have facilities for error handling, such as the use of try-catch blocks or error handling functions like @@ERROR or TRY...CATCH. These features allow programmers to handle errors that may occur during data manipulation operations.

Option B) False - This option is correct. The statement is false because SQL does have facilities for handling errors during data manipulation.

The correct answer is B) False.

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

  1. a) DELCARE and BEGIN

  2. b) DECALRE and EXCEPTION

  3. c) EXCEPTION and END

  4. d) BEGIN and END


Correct Option: A,B

A Rollback statement cannot be used to close transaction.

  1. True

  2. False


Correct Option: B

AI Explanation

To answer this question, let's first understand what a rollback statement is and its purpose in a transaction.

A rollback statement is used to undo or cancel the changes made in a transaction and restore the database to its previous state. It is typically used when an error or an exceptional condition occurs during the execution of a transaction.

Now, coming to the given statement: "A Rollback statement cannot be used to close a transaction."

This statement is incorrect. A rollback statement is indeed used to close a transaction by undoing the changes made within the transaction. After executing a rollback statement, the transaction is effectively closed, and any changes made within the transaction are reverted.

Therefore, the correct answer is B) False.

You want to create a PL/SQL block of code that calculates discounts on customer orders. This code will be invoked from several places, but only within the program unit ORDERTOTAL. What is the most appropriate location to store the code that calculates the discounts?

  1. a) A stored procedure on the server.

  2. b) A block of code in a PL/SQL library.

  3. c) A standalone procedure on the client machine.

  4. d) A block of code in the body of the program unit ORDERTOTAL.

  5. e) A local subprogram defined within the program unit ORDERTOTAL.


Correct Option: E
  1. a) Raise Application procedure

  2. b) Raise Application Error procedure

  3. c) Application Error procedure

  4. d) None of the Above


Correct Option: B
  1. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST = 1

  2. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST(1)

  3. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE TRAILER

  4. All of the above


Correct Option: B,C

Which line of the following code has an error? SELECT * FROM emp WHERE comm = NULL ORDER BY ename;

  1. SELECT *

  2. FROM emp

  3. WHERE comm = NULL

  4. There is no error in this statement.


Correct Option: D

AI Explanation

To answer this question, we need to analyze each line of the code to identify any errors:

A. SELECT * This line is correct. It specifies that all columns should be selected from the table.

B. FROM emp This line is correct. It specifies the table name "emp" from which the data should be retrieved.

C. WHERE comm = NULL This line has an error. In SQL, you cannot compare a value to NULL using the "=" operator. Instead, you should use the "IS NULL" operator to check for NULL values. The correct syntax should be: WHERE comm IS NULL

D. There is no error in this statement. This is the correct answer. The only error in the code is on line C, where the comparison operator should be "IS NULL" instead of "=".

Therefore, the correct answer is D.

  1. a) A comma has been left after the STATS_EXIST_EXCEPTION exception.

  2. b) The STATS_EXIST_EXCEPTION has not been declared as a number.

  3. c) The STATS_EXIST_EXCEPTION has not been declared as an exception.

  4. d) none of the above


Correct Option: C
Explanation:

To understand what prevents this procedure from being created successfully, we need to examine the given procedure. The procedure DELETE_PLAYER takes an input parameter V_IDIN and attempts to delete the corresponding record from the PLAYER table. It also has an exception block that handles the STATS_EXIST_EXCEPTION exception and outputs an error message.

Now, let's go through each option and see if it affects the creation of the procedure:

A. a) A comma has been left after the STATS_EXIST_EXCEPTION exception. This option is incorrect. There is no comma after the STATS_EXIST_EXCEPTION exception, so this cannot be the reason why the procedure cannot be created.

B. b) The STATS_EXIST_EXCEPTION has not been declared as a number. This option is incorrect. The STATS_EXIST_EXCEPTION is not being used as a number, so it does not need to be declared as such. It is being used as an exception.

C. c) The STATS_EXIST_EXCEPTION has not been declared as an exception. This option is correct. The STATS_EXIST_EXCEPTION exception has not been declared in the procedure. Without a declaration, the procedure does not know what to do when the exception is raised. To fix this, the STATS_EXIST_EXCEPTION should be declared as an exception before the BEGIN keyword.

D. d) none of the above This option is incorrect. As explained above, option C is the correct answer.

Therefore, the correct answer is:

The Answer is: C

Find the i/p file records as below: Student A - Max = 100 Min = 60 Student B - Max = 60 Min = 50 Student C - Max = 80 Min = 75 How to format the file to the following o/p data? Student A - Maximum = 100 Minimum = 60 Student B - Maximum = 60 Minimum = 50 Student C - Maximum = 80 Minimum = 75

  1. OPTION COPY INREC FINDREP=(INOUT=(C'Max',C'Maximum',C'Min',C'Minimum')

  2. OPTION COPY INREC FINDREP=(C'Max',C'Maximum',C'Min',C'Minimum')

  3. Both a and b

  4. None of the above


Correct Option: A