Tag: technology

Questions Related to technology

This statement fails when executed: CREATE OR REPLACE TRI GGER CALC_TEAM_AVG AFTER I NSERT ON PLAYER BEGIN INSERT INTO PLAYER_BATSTAT ( PLAYER_I D, SEASON_YEAR, AT_BATS, HI TS) VALUES ( : NEW. I D, 1 997, 0, 0) ; END; To which type must you convert the trigger to correct the error?

  1. a) Row

  2. b) Statement

  3. c) ORACLE FORM trigger

  4. d) Before


Correct Option: A

AI Explanation

To answer this question, we need to understand the different types of triggers in Oracle.

Option A) Row - This option is correct because the given trigger is an "AFTER INSERT" trigger, which is a row-level trigger. Row-level triggers fire once for each row that is affected by the triggering event. In this case, the trigger is fired after each row is inserted into the PLAYER table.

Option B) Statement - This option is incorrect because statement-level triggers fire once for each triggering event, regardless of the number of rows affected. Statement-level triggers are used with bulk operations or when you want to perform an action based on the entire set of affected rows.

Option C) ORACLE FORM trigger - This option is incorrect because Oracle Form triggers are specific to Oracle Forms, which is a development tool for creating GUI applications. Form triggers are not applicable in this scenario.

Option D) Before - This option is incorrect because "BEFORE INSERT" triggers are executed before the insert operation is performed. The given trigger is an "AFTER INSERT" trigger.

The correct answer is A) Row. This option is correct because the given trigger should be converted to a row-level trigger to fix the error.

Which type of argument passes a value from a calling environment?

  1. a) VARCHER2.

  2. b) BOOLEAN.

  3. c) OUT.

  4. d) IN.


Correct Option: D
Explanation:

To answer this question, the user needs to have knowledge of different types of arguments in programming.

a) VARCHER2: This is not a type of argument. It is a data type used to store character strings in Oracle database.

b) BOOLEAN: This is not a type of argument that passes a value from a calling environment.

c) OUT: This type of argument passes a value to the calling environment. It is used when a function or procedure needs to return more than one value.

d) IN: This type of argument passes a value from the calling environment to the function or procedure. It is used when a function or procedure needs to receive values from the calling environment.

Therefore, the correct answer is:

The Answer is: D. IN.

  1. Returns error.

  2. Lists your last logins.

  3. Returns your username.

  4. Tells you where you currently are.


Correct Option: C
  1. Compares files, and shows where they differ.

  2. Tells you how many lines, words, and characters there are in a file.

  3. Removes a file

  4. Shows the first part of a file.


Correct Option: B
  1. a) GRANT SELECT ON ADD_PLAYER TO PUBLIC;

  2. b) GRANT EXECUTE ON ADD_PLAYER TO PUBLIC;

  3. c) GRANT INSERT ON PLAYER TO PUBLIC;

  4. d) GRANT EXECUTE, INSERT ON ADD_PLAYER TO PUBLIC;

  5. e) REVOKE INSERT ON PLAYER FROM PUBLIC;


Correct Option: B,E
  1. Lets you write data in file.

  2. Lets you change the read, write, and execute permissions on your files

  3. Converts plain text files into postscript for printing

  4. Lets you exchange one-line messages with another user


Correct Option: D

what is the value of x and y after running this code? class a { public static void main(String args[]) { int x=1; int y=x++; } }

  1. x=1 and y=1

  2. x=2 and y=2

  3. x=1 and y=2

  4. x=2 and y=1


Correct Option: D
  1. Show disk space available on the system

  2. Show the last few lines of a file

  3. Show who are all logged into the local system

  4. Show error


Correct Option: C