![]() Describe the difference between division and modulo.Include the SpecialOfferID and Description columns in the results. If the MaxQty value is NULL, replace it with the value 10. Write a query using the Sales.SpecialOffer table that multiplies the MaxQty column by the DiscountPct column.Multiply the MinQty column by the DiscountPct column. Write a query using the Sales.SpecialOffer table.Display the difference between the MinQty and MaxQty columns along with the SpecialOfferID and Description columns. Use the AdventureWorks2012 database to complete this exercise. Explain the difference between the ISNULL and COALESCE functions.Hint: You will need to use a function to write this query. Write a query using the Production.Product table displaying a description with the “ProductID: Name” format.Make sure that all rows display a value even if the Color value is missing. Modify the query written in question 2 so that the description of the product is displayed in the “Name: Color” format.If the color column contains a NULL value, replace the color with No Color. Write a query using the Production.Product table displaying the product ID, color, and name columns.Write a query that displays in the “AddressLine1 (City PostalCode)” format from the Person.Address table.You can find the solutions in the Appendix. Determine which query performs the best, and explain why you think so. Explain why there is no difference in performance between the two queries. Type the following code into the query window, and then complete each question. Be sure to turn on the Include Actual Execution Plan setting before you begin. Display the difference between the MinQty. Write a query using the Sales.SpecialOffer table. Use the AdventureWorks2012 database to complete this exercise. Use the AdventureWorks2012 database to complete this exercise. Write a SELECT statement that lists the customer ID numbers and sales order ID numbers from the Sales.SalesOrderHeader table.Īnswer this question: Why should you specify column names rather than an asterisk when writing the select-list? Give at least two reasons. Write a SELECT statement that lists the name, product number, and color of each product from the _Production.Product _table. Include the StoreID and the AccountNumber from the Sales.Customers table. Write a SELECT statement that lists the customers along with their ID numbers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |