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.
Questions
Which of the query will print the output as 'TCS' (single quotes should come in the output)
- select ' ' ' || 'TCS' || ' ' ' from dual
- select ' ' 'TCS' ' ' from dual
- select 'TCS' from dual
- select "TCS" from dual
What is the maximum number of tables that can be stored on a Partitioned Table Space?
- TWO
- ONE
- FIVE
- EIGHT
Which view contains details about locked objects ?
- v$lock
- v$user_objects
- v$locked_object
- v$session
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
- No data found
- Error
- 1
- 0
select INSTR('TCS_SQL','S',4) from dual;
- 3
- 6
- 5
- 4
MAX. NO OF ROWS PER PAGE?
- 127
- 136
- 38
- 16
What is the size of a data page?
- 4K to 8K
- 4K to 10K
- 5K to 10K
- 5K to 15K
What is the maximum number of tables that can be stored on a Partitioned Table Space?
- TWO
- ONE
- FIVE
- EIGHT
What is the maximum number of tables that can be joined?
- Twenty
- Eight
- Fifteen
- Six
Can I use DB2 Stored Procedures with Debug Tool?
- True
- False
When you COMMIT, is the cursor closed?
- True
- False
Is DECLARE CURSOR Executable?
- True
- False
Can you have more than one cursor open at any one time in a program?
- True
- False
What is the Physical Storage Length of TIMESTAMP DB2 data type?
- 10 bytes
- 2 bytes
- 5 bytes
- 4 bytes
What is the Physical Storage Length of DATE DB2 data type?
- 2 bytes
- 4 bytes
- 8 bytes
- 6 bytes
Select odd item from the list.
- VARCHAR2
- CHAR
- NCHAR
- VARCHAR
Following datatype cannot be used twice in a table.
- NCHAR
- LONG
- INTEGER
- TIMESTAMP
CHAR is not compatible with.
- NCHAR
- DATE
- VARCHAR2
- BLOB
Which one is PL/SQL (but not SQL) datatype
- LONG
- NUMBER
- INTEGER
- REF
Select all ANSI supported datatypes.
- CHARACTER
- NUMBER
- INTEGER
- REAL