SUBQUERY

MULTIPLE CHOICE QUESTION SET-4

1)The NOT operator can be used with IN, ANY, and ALL operators in multiple-row subqueries. State true or false.

 

Select one:

 True

 False

2)

The ___________ returns all the rows from the left table, with the matching rows in the right table

a.left outer join

b.Full outer join

c.Joins

d.Right outer join

3)

Consider the below tables:

 

Promotions Table

Column Name    Datatype             Constraint

Promo_id            Number               PK

Promo_name     Varchar

Promo_begin_date          Date     

Promo_end_date             Date     

 

Sales Table

Column Name    Datatype             Constraint

Promo_id            Number               FK

Cust_id  Number               FK

Time_id                Date     

 

Customer Table

Column Name    Datatype             Constraint

cust_id  Number               PK

cust_name          Varchar

 

The Below query will generate a report showing the promo name along with the

customer name for all products that were sold during their promo campaign and before 30th October 2007.

 

SELECT promo_name,cust_name FROM promotions p JOIN sales s

 

ON(time_id BETWEEN promo_begin_date AND promo_end_date)

 

JOIN customer c ON (s.cust_id = c.cust_id) AND time_id < '30-oct-2007';

 

Which statement is true regarding the above query?

 

 

 

Select one:

 a. It executes successfully but does not give the required result.

 b. It produces an error because the join order of the tables is incorrect.

 c. It executes successfully and gives the required result.

 d. It produces an error because equijoin and nonequijoin conditions cannot be used in the same.

4)

Which operator is NOT appropriate in the join condition of a non-equi join SELECT statement?

Select one:

 a. IN operator

 b. BETWEEN x AND y operator

 c. equal operator

 d. LIKE operator

 e. greater than or equal to operator.

5)

___________________ is a type of equi join that compares the common columns of both the table with each other.

 

a.Full outer join

b.Right outer join

c.Left outer join

d.natural join.

  • Loginhackers Blogger
  • Contact us via Twitter Loginhackers
  • Contact us via Instagram
  • loginhackers facebook contact id

Free Premium | Spotify premium for free | Grammarly free premium | Netflix free accounts | Netflix mod | Spotify mod | Hotstar mod | Spotify premium mod apk | free amazon prime account