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.
Questions
Which type of view is implemented as a subquery embedded in the FROM clause of a SELECT statement and is identified by an alias?
- Simple
- Inline
- Complex
- Nested
How many join conditions should be there to avoid a Cartesian Join for joining three tables?
- 1
- 2
- 3
- None of the above
What is the correct use of the Trunc command on a date?
- TRUNC=To_Date('09-Jan-02,DD-MON-YY,'YEAR',"Date" from Dual;
- Select TRUNC(To_Date('09-Jan-02,DD-MON-YY,YEAR')) "DATE" from Dual;
- Date =TRUNC(To_DATE('09-Jan-02','DD-MON-YY'),'YEAR'),'YEAR)"DATE: from DUAL;
- SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') "Date " FROM DUAL;
How many join conditions should be there to avoid a Cartesian Join for joining three tables?
- 1
- 2
- 3
- None of those
Which type of join should be written to perform an outer join of tables A and B that returns all rows from B?
- Any outer join
- A left outer join
- A cross join
- A right outer join
How many join conditions should be there to avoid a Cartesian Join for joining three tables?
- 1
- 2
- 3
- None of those
Convert a date to a character expression
- SELECT SUBSTR ('HelloWorld',1) FROM dual;
- SELECT LOWER (SUBSTR ('HellowWorld', 2,1) FROM dual;
- SELECT INITCAP(TRIM('HellowWorld', 1,1) FROM dual;
- SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual;
Where is the GROUP BY clause statement placed in a SELECT statement that includes a WHERE clause?
- Immediately after the SELECT clause
- Before the WHERE clause
- After the ORDER BY clause
- After the WHERE clause
which one is not the view feature..? ( choose one)
- restrict data access
- easy maintainance of complex queries
- fast access
- data independence
When 'select * from
- control files
- redo log files
- user_views data dictionary view
- base table
data type of 'text' column stored in user_view column...
- varchar2()
- long
- char()
- lob()
simple view definition contains functions.....
- True
- False
which one is not the view feature..?
- restrict data access
- fast access
- easy maintainance for complex queries
- data independence
Which one is useful to check whether the columns in a join view can be updated...?
- user_views
- all_views
- user_updatable_columns
- dba_views
Which one is correct statement about inline views....?
- inline view is a schema object
- is a subquery used in where clause
- inline view can't have group functions
- none of the above
'ORDER BY' clause can be used in the creation of a view..?
- True
- False
The maximum columns that can present in a view..?
- 999
- 1000
- 1001
- limit is only for tables....
How to change the definition of a view in a simple way..?
- drop the view and create a new one
- use CREATE OR REPLACE syntax
- use ALTER VIEW syntax
- use UPDATE sytax
An NPS 10600 has how many SPU's
- True
- False
In NPS, you can ALTER DATABASE while other people are accessing the same database
- No
- Yes
- 1
- 0