0

databases Online Quiz - 46

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

Which SQL statement is used to extract data from a database?

  1. FETCH

  2. EXTRACT

  3. GET

  4. SELECT


Correct Option: D

Which SQL statement is used to delete data from a database table?

  1. DROP

  2. DELETE

  3. TRUNCATE

  4. REMOVE


Correct Option: B

What is a trigger

  1. A piece of logic written in PL/SQL

  2. Executed at the arrival of a SQL*FORMS event

  3. Both A & B

  4. None of the above


Correct Option: C

RENAME command is a :

  1. DCL command

  2. TCL command

  3. DDL command

  4. DML command


Correct Option: C

Data Dictionary:

  1. Is a collection of tables created and maintained by oracle server.

  2. Contain user information.

  3. Contain database information.

  4. Both a and c

  5. All


Correct Option: E

A DML statement is executed when you:

  1. Modify existing rows in a table.

  2. Add a new column in a table

  3. Both a & b

  4. None


Correct Option: A

Select the correct order of evaluation for following operators: I.LIKE II.NOT III.AND IV.OR

  1. I,III,IV,II

  2. I,II,III,IV

  3. IV,III,II,I

  4. IV,II,I,III


Correct Option: B

You can not add data through a view if the view includes:

  1. FROM

  2. Columns defined by expression

  3. WHERE

  4. Both b & c


Correct Option: B

Fast Load can load the duplicate record in a multiset table.

  1. True

  2. False


Correct Option: A

Which of the following property is true about FAST LOAD.

  1. No more than 1 data type conversion is allowed per column during the Fastload

  2. If an AMP is down FL cannot be restarted untill that AMP is back online

  3. only load 1 empty table with one fast load job

  4. Fast load assembles data in 64K blocks and then loads it using mutltiple sessions

  5. Fast load supports triggers.


Correct Option: A,B,C

Which of the following utility is designed to allow OLTP trasactions to immediately load in Datawarehouse?

  1. Fast Load

  2. Multi Load

  3. Tpump

  4. Fast Export


Correct Option: C

For Fast load script to be restartable which of the following should hold true?

  1. Target table should not be created in the script

  2. target table should be created in the script

  3. Error tables should not be dropped in the script

  4. Checkpoint should be declared in the script

  5. Target table should not be dropped in the script


Correct Option: A,C,D,E

select the properties of TPUMP

  1. It is possible to stipulate how many updates may occur per minute

  2. It is possible to have tpump running in the background all the time and just control its flow rate

  3. It can load upto 60 tables at a time if using a single source

  4. It can be stopped any time and all locks dropped or released with no ill consequences.

  5. it uses macro to run the SQL statements

  6. It has more error tollerance than FL and ML


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

Sub-queries can be nested in

  1. DELETE statements only

  2. UPDATE, DELETE, INSERT and SELECT statements

  3. UPDATE statements only

  4. INSERT statements only


Correct Option: B

AI Explanation

To answer this question, you need to understand the concept of sub-queries and where they can be nested.

Sub-queries are queries that are nested within another query. They are used to retrieve data from one or more tables and can be used in various types of SQL statements.

The correct answer is B) UPDATE, DELETE, INSERT, and SELECT statements.

Explanation for each option:

A) DELETE statements only - This option is incorrect because sub-queries can be nested in other types of statements as well, not just DELETE statements.

B) UPDATE, DELETE, INSERT, and SELECT statements - This option is correct because sub-queries can be nested in UPDATE, DELETE, INSERT, and SELECT statements. They can be used to filter or retrieve data based on conditions from other tables.

C) UPDATE statements only - This option is incorrect because sub-queries can be used in other types of statements as well, not just UPDATE statements.

D) INSERT statements only - This option is incorrect because sub-queries can be used in other types of statements as well, not just INSERT statements.

Therefore, the correct answer is B) UPDATE, DELETE, INSERT, and SELECT statements.

Which SQL statement inserts data into a table called Projects?

  1. INSERT Projects VALUES ('Content Development', 'Website content development project')

  2. SAVE INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project')

  3. INSERT INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project')

  4. INSERT Projects ('Content Development', 'Website content development project')


Correct Option: C

AI Explanation

To answer this question, you need to understand the syntax for the SQL INSERT statement. The correct statement to insert data into a table called Projects is:

C. INSERT INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project')

Let's go through each option to understand why it is correct or incorrect:

Option A) INSERT Projects VALUES ('Content Development', 'Website content development project') - This option is incorrect because it is missing the "INTO" keyword. The correct syntax is "INSERT INTO".

Option B) SAVE INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project') - This option is incorrect because the keyword "SAVE" is not a valid keyword in SQL. The correct keyword is "INSERT INTO".

Option C) INSERT INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project') - This option is correct. It uses the correct syntax for the INSERT statement and specifies the column names (ProjectName, ProjectDescription) and their corresponding values.

Option D) INSERT Projects ('Content Development', 'Website content development project') - This option is incorrect because it is missing the "INTO" keyword. The correct syntax is "INSERT INTO".

The correct answer is C. This option is correct because it uses the correct syntax for the SQL INSERT statement and specifies the column names and their corresponding values.

Which of the following SQL statements is correct?

  1. SELECT FROM Sales WHERE Date BETWEEN '10/12/2005' AND '01/01/2006'

  2. SELECT * FROM Sales WHERE Date BETWEEN '10/12/2005' AND '01/01/2006'

  3. SELECT FROM Sales WHERE Date BETWEEN ('10/12/2005', '01/01/2006')

  4. All the above


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) SELECT FROM Sales WHERE Date BETWEEN '10/12/2005' AND '01/01/2006' - This option is incorrect because it is missing the column names to select in the SELECT clause. The correct syntax should be SELECT [column names] FROM [table name].

Option B) SELECT * FROM Sales WHERE Date BETWEEN '10/12/2005' AND '01/01/2006' - This option is correct because it selects all columns () from the "Sales" table where the "Date" column is between '10/12/2005' and '01/01/2006'. The asterisk () is a wildcard character that represents all columns in the table.

Option C) SELECT FROM Sales WHERE Date BETWEEN ('10/12/2005', '01/01/2006') - This option is incorrect because it is missing the column names to select in the SELECT clause. Additionally, the syntax for specifying a range with the BETWEEN operator is incorrect. The correct syntax is BETWEEN [lower value] AND [upper value].

Option D) All the above - This option is incorrect because only option B is the correct statement.

Therefore, the correct answer is B) SELECT * FROM Sales WHERE Date BETWEEN '10/12/2005' AND '01/01/2006'. This option is correct because it selects all columns from the "Sales" table where the "Date" column is between '10/12/2005' and '01/01/2006'.

Which of the following SQL clauses is used to sort a result set

  1. Order By

  2. Sort

  3. Arrange

  4. All the above


Correct Option: A
- Hide questions