0

databases Online Quiz - 227

Description: databases Online Quiz - 227
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan


Correct Option: C

Tables, views , incexes are all part of database objects

  1. True

  2. False


Correct Option: A

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
Explanation:

To solve this question, the user needs to know the basic SQL commands for deleting data from a table.

Option A: DROP is used to delete an entire table, not just its data. This option is incorrect.

Option B: DELETE is used to delete data from a table. However, it writes the deleted data to the rollback segment in case it needs to be recovered later. This option is incorrect.

Option C: CASCADE is an option used with the DROP command to delete all objects that depend on the specified object before dropping that object. This option is incorrect.

Option D: TRUNCATE is used to delete all data from a table without logging the individual row deletions. It does not write the deleted data to the rollback segment, making it a faster operation compared to DELETE. This option is correct.

Therefore, the answer is: D. TRUNCATE.

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

AUTONOMUS_TRANSACTION is a

  1. Programming technique

  2. Automatically used in all prpgramme

  3. PL/SQL compiler directive

  4. All of the above


Correct Option: C

PACK_MESSAGE is used in

  1. queeing

  2. piping

  3. Autonomus transaction

  4. Host I/O


Correct Option: B

Which is true for ROWID% data type

  1. Binary data upto 4GB

  2. Character data upto 4 GB

  3. A hexadecimal string representing the unique address of a row in its table

  4. Binary data stored in an external file


Correct Option: C
Explanation:

To solve this question, the user needs to know about the ROWID data type in databases.

The ROWID is a pseudo column added by Oracle to all tables, which stores the row's unique identifier. The ROWID is represented in hexadecimal format, and it uniquely identifies each row in a table.

Now, let's go through each option and explain why it is right or wrong:

A. Binary data upto 4GB: This option is incorrect because ROWID is not a data type that stores binary data.

B. Character data upto 4 GB: This option is incorrect because ROWID is not a data type that stores character data.

C. A hexadecimal string representing the unique address of a row in its table: This option is correct. The ROWID data type stores a hexadecimal string that represents the unique address of a row in its table.

D. Binary data stored in an external file: This option is incorrect because ROWID is not a data type that stores binary data in an external file.

The Answer is: C

SELECT ROUND(TRUNC(MOD(1600,10),-1),2)

  1. ERROR

  2. 0

  3. 1

  4. 0.00


Correct Option: B

What can you create to restrict user access to a table?

  1. Index

  2. synonym

  3. view

  4. trigger


Correct Option: C

What can be used in a SELECT statement to obtain search criteria for the SELECT statement?

  1. HAVING clause

  2. ORDER BY clause

  3. Subquery

  4. GROUP BY clause


Correct Option: C

What database object is used to increase performance for accessing data within a database?

  1. Roles

  2. Sequences

  3. Synonyms

  4. Index


Correct Option: D

Which clause of the CREATE SEQUENCE statement will cause the sequence to continue to generate numbers even after the maximum limit is reached?

  1. MAXVALUE

  2. MINVALUE

  3. CYCLE

  4. INCREMENT BY


Correct Option: C

Which datatypes are alphanumeric?

  1. Number

  2. Blob

  3. Char

  4. Raw


Correct Option: C

How do you execute an anonymous block within SQL*Plus?

  1. exec command

  2. / command

  3. execute command

  4. None of these


Correct Option: B

Where can NOT a subquery be used within a SQL statement that is in a PL/SQL block?

  1. WHERE

  2. FROM

  3. INSERT

  4. UPDATE


Correct Option: B

What tasks are you able to perform within a PL/SQL block?

  1. DELETE

  2. CREATE

  3. UPDATE

  4. ALTER


Correct Option: A,C

Which database model allows you to store and execute a PL/SQL program as part of an object?

  1. Hierarchical

  2. Relational

  3. Object Relational

  4. Network


Correct Option: C

What data dictionary view will display information about the columns in the database that have constraints?

  1. USER_CONSTRAINTS

  2. USER_CONS_COLUMNS

  3. DBA_CONSTRAINTS

  4. DBA_TABLE


Correct Option: B

What PL/SQL control structure is known as an IF-THEN statement?

  1. Conditional

  2. Sequential

  3. Iterative

  4. Loop


Correct Option: A
- Hide questions