### databases Online Quiz - 225

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

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

Correct Option: B
1. 1

2. 2

3. 3

4. None of the above

Correct Option: B

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;

Correct Option: D

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

Correct Option: B

#### AI Explanation

To avoid a Cartesian Join when joining three tables, you need to have join conditions that link the tables together. A Cartesian Join occurs when there are no join conditions specified, resulting in a combination of all rows from each table.

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

Option A) 1 - This option is incorrect. Having only one join condition would still result in a Cartesian Join. You need to specify join conditions that link all three tables together.

Option B) 2 - This option is correct. To avoid a Cartesian Join when joining three tables, you need to have at least two join conditions. This ensures that each table is properly linked to the other two, preventing a Cartesian Join.

Option C) 3 - This option is incorrect. While having three join conditions might work in some cases, it is not necessary to avoid a Cartesian Join when joining three tables. Two join conditions are sufficient.

Option D) None of those - This option is incorrect. The correct answer is B, as explained above.

The correct answer is B. This option is correct because having two join conditions is necessary to avoid a Cartesian Join when joining three tables.

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

Correct Option: D

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

Correct Option: B

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;

Correct Option: D

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

Correct Option: D

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

Correct Option: C

When 'select * from ' is given, oracle server checks for..

1. control files

2. redo log files

3. user_views data dictionary view

4. base table

Correct Option: C

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

1. varchar2()

2. long

3. char()

4. lob()

Correct Option: B

simple view definition contains functions.....

1. True

2. False

Correct Option: B

which one is not the view feature..?

1. restrict data access

2. fast access

3. easy maintainance for complex queries

4. data independence

Correct Option: B

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

Correct Option: C

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

Correct Option: D

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

1. True

2. False

Correct Option: A

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

1. 999

2. 1000

3. 1001

4. limit is only for tables....

Correct Option: B

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

Correct Option: B

An NPS 10600 has how many SPU's

1. True

2. False

Correct Option: A

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

1. No

2. Yes

3. 1

4. 0

Correct Option: A
- Hide questions