These answers have been updated to work with Adventureworks on 2008R2. 1. Write an UPDATE query that would set your middle name, for only your record by personID. (if there is no record for you, add it in first, then show me the update to set your middle name.) UPDATE Person.Contact SET MiddleName = ‘Dwight’…
Month: March 2006
SQL101-Homework Assignment #5
Here’s another set of questions for you to practice on. As always, if you have any questions, let me know and I’ll help you. UPDATE 1. Write an UPDATE query that would set your middle name, for only your record by personID. (if there is no record for you, add it in first, then show…
SQL101-Homework Assignment #4 Answer Key
Here are my solutions updated to work with AdventureWorks on 2008R2. 1. Write a DELETE query that would remove a record from person.contact by contactID, pick a contactID that does not exist in person.contact. DELETE FROM Person.Contact WHERE ContactID = -1 2. Write a DELETE query that would remove a record from person.contact by first…
SQL101-Homework Assignment #4
Here are some more practice problems. This time you’re going to practice using DELETE. 1. Write a DELETE query that would remove a record from person.contact by contactID, pick a contactID that does not exist in person.contact. 2. Write a DELETE query that would remove a record from person.contact by first and last name. 3….
SQL 101 – DELETE
It looks like I’m getting close to the end of my 101 series. After I show you how to remove data from tables, the last topic I plan to cover is creating tables. It’s been quite a journey, collecting all this knowledge and putting it out there for you. I had hoped to get some…
SQL 101 – TRANSACTION
As I mentioned in my previous post, before you move on to more difficult topics I need to share with you what a TRANSACTION is, and how to use them. By now I’m sure you’ve seen t-SQL on tutorials. The T stands for transactional. If you don’t know what a TRANSACTION is, that’s pretty meaningless,…