Assignment 2
Assignment 2
Assignment 2
Show the first and last names of the persons in the Person.Person table. We need the one with the first
1- Update the person title of Amy Alberts to ‘Ms.’ and Modify the date (modifieddate) to the
current date.
There might be more than one Amy Alberts. Only update the ones without any title.
*/
Question 3 : Join tables
First, we need First name, Last name and title from Person.person.
(PurchaseOrderDetail, Purchasing.Vendor
PurchaseOrderHeader)
Answer A-
Answer B-
Question 5 : Create a view with only 5 columns. Three columns are (OrderQty, UnitPrice,
PurchaseOrderID) from PurchaseOrderDetail table and two columns are (OrderDate, VendorID) from
A- Create a trigger to fire when a row is going to be updated. The trigger must show a message
to indicate that an update happened with the update’s date.
B) Update all the modified date with the current date and show the results.
persons.
If they have sold more than last year, write ‘Need more bonus’. Otherwise, write ‘No bonus’. Name