Tag: databases

Questions Related to databases

  1. The return code area

  2. The programming language

  3. The segment length

  4. The access type

  5. The DL/I function code


Correct Option: E
PRINT NOGEN  
PCB      TYPE=DB,DBDNAME=VENDOR  
SENSEG   NAME=VENSEG,PROCOPT=G  
SENSEG   NAME=ITEMSEG,PARENT=VENSEG,PROCOPT=R  
SENSEG   NAME=LOCNSEG,PARENT=ITEMSEG,PROCOPT=A  
PSBGEN  
END

Referring to the sample code above, what is missing in the first macro in the PSBGEN job stream?

  1. The PSBNAME

  2. The PROCOPT

  3. The TYPE parameter

  4. The KEYLEN

  5. The NAME parameter


Correct Option: D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) The PSBNAME - This option is incorrect because the PSBNAME is not required in the first macro in the PSBGEN job stream. The PSBNAME is typically specified in subsequent macros.

Option B) The PROCOPT - This option is incorrect because the PROCOPT is not required in the first macro in the PSBGEN job stream. The PROCOPT is typically specified in subsequent macros.

Option C) The TYPE parameter - This option is incorrect because the TYPE parameter is not missing in the first macro in the PSBGEN job stream. The TYPE parameter is specified as "DB" in the first macro.

Option D) The KEYLEN - This option is correct because the KEYLEN is missing in the first macro in the PSBGEN job stream. The KEYLEN specifies the length of the key for the database being used, and it is necessary to define the KEYLEN for proper database operations.

Option E) The NAME parameter - This option is incorrect because the NAME parameter is not missing in the first macro in the PSBGEN job stream. The NAME parameter is specified as "VENDOR" in the TYPE parameter.

The correct answer is D. The KEYLEN is missing in the first macro in the PSBGEN job stream. This option is correct because the KEYLEN is necessary to define the length of the key for the database being used.

@@Error returns the sys.messages.message_id column value if an error occurs in the last T-SQL statement executed.True/False?

  1. True

  2. False


Correct Option: A

A transaction must have ACID properties to be qualified as such.

  1. True

  2. False


Correct Option: A

Which of the Isolation levels causes "Dirty Read"?

  1. Read Uncommitted

  2. Read Committed

  3. Repeatable Read

  4. Snapshot

  5. Serializable


Correct Option: A

Which one of the below functions is Non-Deterministic?

  1. CASE

  2. ISNULL

  3. ISNUMERIC

  4. ISDATE

  5. None


Correct Option: D

The given T-SQL statement is executed. What happens?

  1. A run time error occurs

  2. Returns all the column names in the table but no records

  3. Returns all the records in the table

  4. Returns nothing

  5. Returns NULL


Correct Option: B

COUNT(*) returns the number of items in a group - which of the below is correct?

  1. This includes NULL values and duplicate

  2. This includes NULL values but not the duplicates

  3. This does not include NULL values and duplicates

  4. None of the above


Correct Option: A

We can write triggers for Truncate.

  1. True

  2. False


Correct Option: B