0

databases Online Quiz - 118

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

Consider the following SELECT statement: SELECT dept_no "Departments", MAX(salary) "Max Salaries" FROM employee WHERE dept_no IN(200, 300, 400) GROUP BY Departments HAVING MAX(salary) > 60000; Due to which clause does this statement fail?

  1. Group By

  2. Where

  3. Select

  4. Having


Correct Option: A

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

  1. OPEN

  2. GET

  3. SELECT

  4. EXTRACT


Correct Option: C

AI Explanation

To answer this question, you need to understand the basic SQL (Structured Query Language) syntax.

Option A) OPEN - This option is incorrect because the OPEN statement is not used to extract data from a database. It is used to open a cursor or a file.

Option B) GET - This option is incorrect because the GET statement is not used to extract data from a database. It is used to retrieve a single value from a table.

Option C) SELECT - This option is correct because the SELECT statement is used to extract data from a database. It is the most commonly used SQL statement and allows you to retrieve specific columns or rows from one or more tables.

Option D) EXTRACT - This option is incorrect because the EXTRACT statement is used to retrieve a specific part of a date or time value, such as the year, month, or day.

The correct answer is C) SELECT. This option is correct because the SELECT statement is used to extract data from a database.

Did row migration is caused by less pctfree space in datablock ?

  1. True

  2. False


Correct Option: A

Which background processes is not mandatory in Oracle server?

  1. ARCH

  2. PMON

  3. SMON

  4. RECO


Correct Option: A,D

We can not remove a row from view, if it contains

  1. Group functions

  2. Group by clause

  3. Distinct keyword

  4. All of above


Correct Option: D

We can not remove a row from view, if it contains

  1. Group functions

  2. Group by clause

  3. Distinct keyword

  4. All of the above


Correct Option: D

On dropping a view

  1. respective table data is retained

  2. data is deleted from table

  3. depends on conditions

  4. all of above


Correct Option: A

We can not modify data in view

  1. Group by clause

  2. Distinct keyword

  3. Pseudo column ROWNUM keyword

  4. All of above


Correct Option: D

Any attempt on DML operation on view

  1. Successful

  2. Results in error

  3. Depends on condition

  4. None


Correct Option: B

What is inline view

  1. Class object

  2. Schema object

  3. Both

  4. None of the above


Correct Option: B

Which is correct about an inline view

  1. It is query with alias name

  2. It is subquery with alias name

  3. Both

  4. None of the above


Correct Option: B

Sequence is basically used in generating

  1. Unique key

  2. Primary key

  3. Foreign key

  4. All of the above


Correct Option: B

Why cache option used in sequences

  1. To get automatic values

  2. For esay access

  3. For fast access

  4. All of the above


Correct Option: C

When we do not prefer to create index

  1. A column contains large no of values

  2. A column contains large no of null values

  3. Table is small

  4. When table is not updated frequently


Correct Option: C

Which is not right for Truncate Statement

  1. Deletes rows from table

  2. Removes storage space

  3. Removes table structure

  4. All of the above


Correct Option: C

What are different keys in oracle

  1. Candidate key

  2. Member key

  3. Both of above

  4. None of the above


Correct Option: C

How do you see current user name

  1. show user

  2. get user

  3. display user

  4. display


Correct Option: A

How to change SQL prompt name

  1. set sqlprompt “Ravi Kishore > “

  2. set prompt “Ravi Kishore > “

  3. set sql “Ravi Kishore > “

  4. set sqlpromt “Ravi Kishore > “


Correct Option: A

How to Switch to DOS prompt ?

  1. host

  2. DOS

  3. doshost

  4. dos host


Correct Option: A

How do I eliminate the duplicate rows ?

  1. delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name);

  2. delete duplicate_values_field_name dv from table_name ta where rowid

  3. delete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename);

  4. Delete all


Correct Option: A,B,C
- Hide questions