SQL Views, Joins, and Database Operations Quiz

A quiz covering SQL database concepts including views (simple, inline, complex), view creation and management, join operations (inner, outer, Cartesian), date functions, and database operations in Oracle/NPS environments.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which type of view is implemented as a subquery embedded in the FROM clause of a SELECT statement and is identified by an alias?

  1. Simple
  2. Inline
  3. Complex
  4. Nested
Question 2 Multiple Choice (Single Answer)

How many join conditions should be there to avoid a Cartesian Join for joining three tables?

  1. 1
  2. 2
  3. 3
  4. None of the above
Question 3 Multiple Choice (Single Answer)

What is the correct use of the Trunc command on a date?

  1. TRUNC=To_Date('09-Jan-02,DD-MON-YY,'YEAR',"Date" from Dual;
  2. Select TRUNC(To_Date('09-Jan-02,DD-MON-YY,YEAR')) "DATE" from Dual;
  3. Date =TRUNC(To_DATE('09-Jan-02','DD-MON-YY'),'YEAR'),'YEAR)"DATE: from DUAL;
  4. SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') "Date " FROM DUAL;
Question 4 Multiple Choice (Single Answer)

How many join conditions should be there to avoid a Cartesian Join for joining three tables?

  1. 1
  2. 2
  3. 3
  4. None of those
Question 5 Multiple Choice (Single Answer)

Which type of join should be written to perform an outer join of tables A and B that returns all rows from B?

  1. Any outer join
  2. A left outer join
  3. A cross join
  4. A right outer join
Question 6 Multiple Choice (Single Answer)

How many join conditions should be there to avoid a Cartesian Join for joining three tables?

  1. 1
  2. 2
  3. 3
  4. None of those
Question 7 Multiple Choice (Single Answer)

Convert a date to a character expression

  1. SELECT SUBSTR ('HelloWorld',1) FROM dual;
  2. SELECT LOWER (SUBSTR ('HellowWorld', 2,1) FROM dual;
  3. SELECT INITCAP(TRIM('HellowWorld', 1,1) FROM dual;
  4. SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual;
Question 8 Multiple Choice (Single Answer)

Where is the GROUP BY clause statement placed in a SELECT statement that includes a WHERE clause?

  1. Immediately after the SELECT clause
  2. Before the WHERE clause
  3. After the ORDER BY clause
  4. After the WHERE clause
Question 9 Multiple Choice (Multiple Answers)

which one is not the view feature..? ( choose one)

  1. restrict data access
  2. easy maintainance of complex queries
  3. fast access
  4. data independence
Question 10 Multiple Choice (Single Answer)

When 'select * from

  1. control files
  2. redo log files
  3. user_views data dictionary view
  4. base table
Question 11 Multiple Choice (Single Answer)

data type of 'text' column stored in user_view column...

  1. varchar2()
  2. long
  3. char()
  4. lob()
Question 12 True/False

simple view definition contains functions.....

  1. True
  2. False
Question 13 Multiple Choice (Single Answer)

which one is not the view feature..?

  1. restrict data access
  2. fast access
  3. easy maintainance for complex queries
  4. data independence
Question 14 Multiple Choice (Single Answer)

Which one is useful to check whether the columns in a join view can be updated...?

  1. user_views
  2. all_views
  3. user_updatable_columns
  4. dba_views
Question 15 Multiple Choice (Single Answer)

Which one is correct statement about inline views....?

  1. inline view is a schema object
  2. is a subquery used in where clause
  3. inline view can't have group functions
  4. none of the above
Question 16 True/False

'ORDER BY' clause can be used in the creation of a view..?

  1. True
  2. False
Question 17 Multiple Choice (Single Answer)

The maximum columns that can present in a view..?

  1. 999
  2. 1000
  3. 1001
  4. limit is only for tables....
Question 18 Multiple Choice (Single Answer)

How to change the definition of a view in a simple way..?

  1. drop the view and create a new one
  2. use CREATE OR REPLACE syntax
  3. use ALTER VIEW syntax
  4. use UPDATE sytax
Question 19 True/False

An NPS 10600 has how many SPU's

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

In NPS, you can ALTER DATABASE while other people are accessing the same database

  1. No
  2. Yes
  3. 1
  4. 0