What is a sub-query, Database Management System

Assignment Help:

(a) What is a Sub-Query?

(b) What is the difference between a scalar sub-query and a tabular sub-query?

(c) Write an equivalent SQL statement to get the Name of Product which has the same price list as the Chainring Bolts. Use the following relational schema to answer this question: Production.Product (ProductID, PName, ListPrice)

(d) Convert the following SQL Statement to display the same result by using a sub-query instead of the join.

SELECT p.Name, p.ProductNumber
FROM Production.Product p
JOIN Sales.SalesOrderDetail AS sod
ON p.ProductID = sod.ProductID
WHERE sod.OrderQty > 41

(e) SQL Server may produce unexpected results when performing calculations on columns that have NULL values. So, to resolve this problem you need to use the ISNULL, NULLIF, and COALESCE functions of SQL Server 2005 when your columns hold NULL values. Explain briefly the purpose of each of the above function and support your answer with an appropriate example.


Related Discussions:- What is a sub-query

Define mysql_fetch_object(), What are the differences among MySQL_fetch_arr...

What are the differences among MySQL_fetch_array(), MySQL_fetch_object(), MySQL_fetch_row()? Mysql_fetch_object returns the result from the database like objects while mysql

Access, I have to solve a problem using access

I have to solve a problem using access

Characteristics, what are the main characteristics of database

what are the main characteristics of database

Create the table, Question: Using the data model express the following ...

Question: Using the data model express the following queries in SQL. (a) Create the Table named "Cinema" and make the cinema_code to be the primary key of the relation and

Describe integrity constraints, Describe integrity constraints? Integr...

Describe integrity constraints? Integrity Constraints - A database is just as excellent as the information stored in it, and a DBMS must therefore help avoid the entry of inc

Illustrate package classes and associations into models, Package classes an...

Package classes and associations into models  Programs are made of separate physical units which could be edited, imported, complied or otherwise manipulated. The careful part

For known, What are the function of DBA?

What are the function of DBA?

Database design and documentation, A use case diagram giving a pictorial ov...

A use case diagram giving a pictorial overview of user requirements and brief use case descriptions. As the case study contains only an outline of a business scenario, you will als

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd