Oracle SQL and Database Concepts

Test your knowledge of Oracle SQL including indexes, joins, constraints, views, sequences, and PL/SQL concepts

20 Questions Published

Questions

Question 1 True/False

Can we use a subquery in insert statement

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

maximum limit of VARCHAR2 datatype in SQL & PLSQLRespectively

  1. 4000 / 4000
  2. 4000 / 32767
  3. 2000 / 4000
  4. None of these
Question 3 Multiple Choice (Single Answer)

Default type of compilation in Oracle

  1. INTERPRETTED
  2. NATIVE
  3. BOTH
  4. None of these
Question 4 True/False

A Package spec is compulsory but a package Body is not compulsory

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

For a certain row ina table, a VARCHAR2 coilumn contains the value TCSLTD, padded to the right with seven spaces by the application when the length() function processes the coplumn value , what will be the value returned

  1. 6
  2. 13
  3. 30
  4. 60
Question 6 Multiple Choice (Single Answer)

Dropping of table has which of the following effects on the non unique index created on the table

  1. no effect
  2. The Index will be dropped
  3. The index will become unusable
  4. the index will have NULLvalues
  5. You cannot drop a table until you drop the index
Question 7 Multiple Choice (Single Answer)

Which of the following requires correlated subquery

  1. IN
  2. BETWEEN
  3. LIKE
  4. EXISTS
Question 8 Multiple Choice (Single Answer)

Which of the following is a valid statement for Sequences

  1. IDENTIFIED BY
  2. USING TEMPORARY TABLESPACE
  3. MAXVALUE
  4. ON DELETE CASCADE
  5. CURRVAL
  6. NEXTVAL
Question 9 True/False

Can we modify Primary key constraint

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

Select the incorrect statement

  1. alter table table1 rename column column1 to column2
  2. alter table table1 rename to table 2
  3. alter table table1 add (c1 char(10))
  4. alter table table1 enable constraint t1_pk
Question 11 Multiple Choice (Single Answer)

We can update the value of the columns that is selected on view list

  1. yes always
  2. yes on simple views with group by
  3. no on simple views with group by and distinct clause
  4. yesy on complex views
Question 12 Multiple Choice (Single Answer)

The Default indexing system in oracle

  1. BALANCED TREE
  2. BITMAP
  3. FUNCTIONAL
  4. BINARY TREE
Question 13 Multiple Choice (Single Answer)

An Equi join can be:

  1. Natural join
  2. Inner Join
  3. Both
  4. Cross Join
Question 14 Multiple Choice (Multiple Answers)

What are the different methods of refreshing the materialized view?

  1. Complete
  2. Slow
  3. Fast
  4. Never
Question 15 Multiple Choice (Single Answer)

Which index will be beneficial to create on the column Gender of a table name employee which permits entry of only two values (M/F)?

  1. Compressed Index
  2. Function based Index
  3. Bitmap Index
  4. B*-Tree index
Question 16 Multiple Choice (Single Answer)

Which type of join is this?

  1. Left Outer Join
  2. Right outer Join
  3. Full Outer Join
  4. Inner Join
Question 17 Multiple Choice (Single Answer)

Which is not a valid join?

  1. Equi Join
  2. Natural Join
  3. Left Inner Join
  4. Cartesian product
Question 18 Multiple Choice (Single Answer)

There are 10 rows in Table A and 0 Rows in table B. If you fire the following query:

  1. 10
  2. 0
  3. 1
  4. Syntax Error
Question 19 Multiple Choice (Single Answer)

What does the following query Do?

  1. Null
  2. The Null values of COMMISSION column will be displayed as Null after addition to sal
  3. The Null values of COMMISSION column will be changed to 0 & will be added to sal
  4. Syntax error
Question 20 Multiple Choice (Single Answer)

Examine the SQL Statements that creates ORDERS table: For which columns would an index be automatically created when you execute the above SQL statement?

  1. ) SER_NO, PROD_ID_NUMBER
  2. ORDER_ID and ORDER_DATE
  3. SER_NO, Composite index on ORDER_ID and ORDER_DATE
  4. SER_NO, ORDER_ID and ORDER_DATE