Oracle Databases and SQL

Comprehensive quiz covering Oracle database concepts including data types, SQL commands, indexes, constraints, tablespace management, joins, and PL/SQL programming.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

what is the maximum length of all Oracle Objects?

  1. <=30 characters
  2. <=40 characters
  3. <=32 characters
  4. <=20 characters
Question 2 True/False

In Oracle can we do any DMLs in a function which is called from a select statement?

  1. True
  2. False
Question 3 True/False

In Oracle, is the following Anonymous block is valid? Declare Begin End;

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

In an Outer Join, what happens to columns that are not matched?

  1. All matched columns returns NULLS.
  2. All unmatched columns returns NULLS.
  3. All matched and unmatched columns returns NULLS.
  4. Cant say
Question 5 Multiple Choice (Multiple Answers)

User_Source table contains code for which all Objects?

  1. Functions
  2. Package body
  3. Triggers
  4. Cursor
Question 6 Multiple Choice (Multiple Answers)

For which of these constraints, an unique index is automatically created while creating constraints?

  1. Foreign Key
  2. Primary Key
  3. Check
  4. Unique
  5. Not Null
Question 7 Multiple Choice (Single Answer)

Which of the following clause enables to drop the foreign key constraints of the child table while dropping the parent table?

  1. drop foreign keys
  2. cascade constraints
  3. this is not possible in oracle
  4. clear references
Question 8 Multiple Choice (Single Answer)

What is the difference between varchar and varchar2 data types?

  1. maximum length for varchar is 2000 bytes and for varchar2 is 4000 bytes
  2. varchar is used to store fixed length character data, varchar2 is for variable length character data
  3. varchar data type is not supported in oracle
  4. varchar is applicable only to PL/SQL
Question 9 Multiple Choice (Single Answer)

How many columns are presented after executing this query:SELECT address1||','||address2||','||address2 "Adress" FROM employee;

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

Which Oracle access method is the fastest way for Oracle to retrieve a single row?

  1. Primary key access
  2. Access via unique index
  3. Table access by ROWID
  4. Full table scan
Question 11 Multiple Choice (Single Answer)

To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?

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

Assuming today is Monday, 10 July 2000, what is returned by this statement: SELECT to_char(NEXT_DAY(sysdate, 'MONDAY'), 'DD-MON-RR') FROM dual;

  1. 03-JUL-00
  2. 10-JUL-00
  3. 12-JUL-00
  4. 11-JUL-00
  5. 17-JUL-00
Question 13 Multiple Choice (Single Answer)

Which character is used to continue a statement in SQL*Plus?

  1. *
  2. /
  3. -
  4. @
Question 14 Multiple Choice (Single Answer)

When a user creates an object without a TABLESPACE clause, where will Oracle store the segment?

  1. System tablespace
  2. Users tablespace
  3. Default tablespace for the user
  4. Oracle will give an error
  5. Undefined
Question 15 Multiple Choice (Single Answer)

The primary key on table EMP is the EMPNO column. Which of the following statements will not use the associated index on EMPNO?

  1. select * from EMP where nvl(EMPNO, '00000') = '59384'
  2. select * from EMP where EMPNO = '59384'
  3. select EMPNO, LASTNAME from EMP where EMPNO = '59384'
  4. select 1 from EMP where EMPNO = '59834'
Question 16 Multiple Choice (Single Answer)

Which character function can be used to return a specified portion of a character string

  1. INSTR
  2. SUBSTRING
  3. SUBSTR
  4. POS
Question 17 Multiple Choice (Single Answer)

Which command will delete all data from a table and will not write to the rollback segment?

  1. DROP
  2. DELETE
  3. CASCADE
  4. TRUNCATE
Question 18 Multiple Choice (Single Answer)

Which of the following can be a valid column name

  1. Column
  2. 1966_Invoices
  3. Catch_#22
  4. #Invoices
  5. None of the above
Question 19 Multiple Choice (Single Answer)

Teradata has been called a __________ architecture.

  1. Anything Goes
  2. Shared Nothing
  3. Shared Everything
  4. Dual Redundant
Question 20 Multiple Choice (Single Answer)

A column of a table is declared as NUMBER(10,2).For which of the following values oracle returns an error

  1. 5392845.324
  2. 871039453.1
  3. 97234512.123
  4. 1234567.12