Database Fundamentals: Data Types, Cursors & Storage

Test your knowledge of database concepts including ANSI SQL and PL/SQL datatypes, cursor operations, database transactions, and DB2 storage characteristics.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the query will print the output as 'TCS' (single quotes should come in the output)

  1. select ' ' ' || 'TCS' || ' ' ' from dual
  2. select ' ' 'TCS' ' ' from dual
  3. select 'TCS' from dual
  4. select "TCS" from dual
Question 2 Multiple Choice (Single Answer)

What is the maximum number of tables that can be stored on a Partitioned Table Space?

  1. TWO
  2. ONE
  3. FIVE
  4. EIGHT
Question 3 Multiple Choice (Single Answer)

Which view contains details about locked objects ?

  1. v$lock
  2. v$user_objects
  3. v$locked_object
  4. v$session
Question 4 Multiple Choice (Single Answer)

A new table has been created in the employee. There are no rows in the table.What would be the output of the query?select count(*) from employee

  1. No data found
  2. Error
  3. 1
  4. 0
Question 5 Multiple Choice (Single Answer)

select INSTR('TCS_SQL','S',4) from dual;

  1. 3
  2. 6
  3. 5
  4. 4
Question 6 Multiple Choice (Single Answer)

MAX. NO OF ROWS PER PAGE?

  1. 127
  2. 136
  3. 38
  4. 16
Question 7 Multiple Choice (Single Answer)

What is the size of a data page?

  1. 4K to 8K
  2. 4K to 10K
  3. 5K to 10K
  4. 5K to 15K
Question 8 Multiple Choice (Single Answer)

What is the maximum number of tables that can be stored on a Partitioned Table Space?

  1. TWO
  2. ONE
  3. FIVE
  4. EIGHT
Question 9 Multiple Choice (Single Answer)

What is the maximum number of tables that can be joined?

  1. Twenty
  2. Eight
  3. Fifteen
  4. Six
Question 10 True/False

Can I use DB2 Stored Procedures with Debug Tool?

  1. True
  2. False
Question 11 True/False

When you COMMIT, is the cursor closed?

  1. True
  2. False
Question 12 True/False

Is DECLARE CURSOR Executable?

  1. True
  2. False
Question 13 True/False

Can you have more than one cursor open at any one time in a program?

  1. True
  2. False
Question 14 Multiple Choice (Single Answer)

What is the Physical Storage Length of TIMESTAMP DB2 data type?

  1. 10 bytes
  2. 2 bytes
  3. 5 bytes
  4. 4 bytes
Question 15 Multiple Choice (Single Answer)

What is the Physical Storage Length of DATE DB2 data type?

  1. 2 bytes
  2. 4 bytes
  3. 8 bytes
  4. 6 bytes
Question 16 Multiple Choice (Single Answer)

Select odd item from the list.

  1. VARCHAR2
  2. CHAR
  3. NCHAR
  4. VARCHAR
Question 17 Multiple Choice (Single Answer)

Following datatype cannot be used twice in a table.

  1. NCHAR
  2. LONG
  3. INTEGER
  4. TIMESTAMP
Question 18 Multiple Choice (Single Answer)

CHAR is not compatible with.

  1. NCHAR
  2. DATE
  3. VARCHAR2
  4. BLOB
Question 19 Multiple Choice (Single Answer)

Which one is PL/SQL (but not SQL) datatype

  1. LONG
  2. NUMBER
  3. INTEGER
  4. REF
Question 20 Multiple Choice (Multiple Answers)

Select all ANSI supported datatypes.

  1. CHARACTER
  2. NUMBER
  3. INTEGER
  4. REAL