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

How can we classify the operations on classes, How can we Classify the oper...

How can we Classify the operations on classes  This step fundamentally means all three models functional, object and dynamic (studied in last section) must be combined so that

Explain the form of the create view command, We define a view in SQL throug...

We define a view in SQL through using the create view command. To describe a view, we must provide the view a name and must state the query in which computers the view. The form of

Why does a dbms query language is designed, Why does a DBMS query language ...

Why does a DBMS query language is designed? A DBMS query language is designed to support end users who use English-like commands. support in the development of complex applicat

Express types of information available in mysql, Express types of informati...

Express types of information available in MySQL? Information as regards the result of queries:  This includes number of records affected by any SELECT or UPDATE or DELETE st

Basic concept of data base management system, INTRODUCTION Databases a...

INTRODUCTION Databases and database systems have become an essential part of our daily life. We encounter many activities that involve some interaction with a database almost

Example of sequences, Example : Create a sequence named SEQSS that starts a...

Example : Create a sequence named SEQSS that starts at 105, has a step of 1 and can take maximum value as 2000.  CREATE SEQUENCE SEQSS START WITH 105 INCREMENT BY 1 MAX VA

E-R, Mention various steps required to draw an E-R Diagram. Draw an E-R Dia...

Mention various steps required to draw an E-R Diagram. Draw an E-R Diagram for Student Information System. Mention all suitable assumptions to justify your answer.

What is asterisk in sql, What is Asterisk in SQL? Asterisk (*): In SQL,...

What is Asterisk in SQL? Asterisk (*): In SQL, the columns for all the tables and views in the FROM clause will be displayed.

Recovery concepts, recovey techniques based on deferred update and immediat...

recovey techniques based on deferred update and immediate update

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