0

databases Online Quiz - 209

Description: databases Online Quiz - 209
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

what is the maximum length of all Oracle Objects?

  1. <=30 characters

  2. <=40 characters

  3. <=32 characters

  4. <=20 characters


Correct Option: A

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

  1. True

  2. False


Correct Option: B

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

  1. True

  2. False


Correct Option: B
  1. All matched columns returns NULLS.

  2. All unmatched columns returns NULLS.

  3. All matched and unmatched columns returns NULLS.

  4. Cant say


Correct Option: B

User_Source table contains code for which all Objects?

  1. Functions

  2. Package body

  3. Triggers

  4. Cursor


Correct Option: A,B,C

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


Correct Option: A,B,C,D,E

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


Correct Option: D

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


Correct Option: D

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


Correct Option: A
  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan


Correct Option: C

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


Correct Option: C

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


Correct Option: E
Explanation:

To solve this question, the user needs to understand the function of each element of the SQL statement and how it affects the output.

The SQL statement is selecting a date and formatting it according to the given format string. Specifically:

  • sysdate returns the current date and time.
  • NEXT_DAY(sysdate, 'MONDAY') returns the next occurrence of the day specified as the second argument, after the current date and time (sysdate). In this case, it returns the next Monday after 10 July 2000, which is 17 July 2000.
  • to_char() converts the resulting date into a string using the format specified as the second argument. In this case, the format is 'DD-MON-RR', which returns the day of the month (DD), the abbreviated month name (MON), and the 2-digit year (RR).

Therefore, the correct answer is E. 17-JUL-00, as the SQL statement returns the formatted date of the next Monday after 10 July 2000, which is 17 July 2000.

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

  1. *

  2. /

  3. -

  4. @


Correct Option: C

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


Correct Option: C

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'


Correct Option: A

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

  1. INSTR

  2. SUBSTRING

  3. SUBSTR

  4. POS


Correct Option: C

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


Correct Option: D

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


Correct Option: D

Teradata has been called a __________ architecture.

  1. Anything Goes

  2. Shared Nothing

  3. Shared Everything

  4. Dual Redundant


Correct Option: B

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


Correct Option: B
- Hide questions