Oracle Database and SQL Fundamentals

Covers Oracle database concepts including SQL*Plus commands, sequences, views, indexes, background processes, and DML operations.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

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
Question 2 Multiple Choice (Single Answer)

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

  1. OPEN
  2. GET
  3. SELECT
  4. EXTRACT
Question 3 True/False

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

  1. True
  2. False
Question 4 Multiple Choice (Multiple Answers)

Which background processes is not mandatory in Oracle server?

  1. ARCH
  2. PMON
  3. SMON
  4. RECO
Question 5 Multiple Choice (Single Answer)

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
Question 6 Multiple Choice (Single Answer)

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
Question 7 Multiple Choice (Single Answer)

On dropping a view

  1. respective table data is retained
  2. data is deleted from table
  3. depends on conditions
  4. all of above
Question 8 Multiple Choice (Single Answer)

We can not modify data in view

  1. Group by clause
  2. Distinct keyword
  3. Pseudo column ROWNUM keyword
  4. All of above
Question 9 Multiple Choice (Single Answer)

Any attempt on DML operation on view

  1. Successful
  2. Results in error
  3. Depends on condition
  4. None
Question 10 Multiple Choice (Single Answer)

What is inline view

  1. Class object
  2. Schema object
  3. Both
  4. None of the above
Question 11 Multiple Choice (Single Answer)

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
Question 12 Multiple Choice (Single Answer)

Sequence is basically used in generating

  1. Unique key
  2. Primary key
  3. Foreign key
  4. All of the above
Question 13 Multiple Choice (Single Answer)

Why cache option used in sequences

  1. To get automatic values
  2. For esay access
  3. For fast access
  4. All of the above
Question 14 Multiple Choice (Single Answer)

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
Question 15 Multiple Choice (Single Answer)

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
Question 16 Multiple Choice (Single Answer)

What are different keys in oracle

  1. Candidate key
  2. Member key
  3. Both of above
  4. None of the above
Question 17 Multiple Choice (Single Answer)

How do you see current user name

  1. show user
  2. get user
  3. display user
  4. display
Question 18 Multiple Choice (Single Answer)

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 > “
Question 19 Multiple Choice (Single Answer)

How to Switch to DOS prompt ?

  1. host
  2. DOS
  3. doshost
  4. dos host
Question 20 Multiple Choice (Multiple Answers)

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 <(select min(rowid) from table_name tb where ta.dv=tb.dv);
  3. delete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename);
  4. Delete all