1 / 11

Wrapping up

Wrapping up. What are a couple things to consider (as discussed in class) with regards to insert statements?. If you do not specify the columns you are inserting data into SQL expects there to be a value for each column that exists in the table

Télécharger la présentation

Wrapping up

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Wrapping up

  2. What are a couple things to consider (as discussed in class) with regards to insert statements? • If you do not specify the columns you are inserting data into SQL expects there to be a value for each column that exists in the table • If you do not specify the columns SQL will insert the first value listed into the first column, the second value listed into the second column, and so forth

  3. Does anyone know what SQL Azure is? Microsoft SQL Azure is a highly available, and scalable cloud database service built on SQL Server technologies. With SQL Azure, developers do not have to install, setup, patch or manage any software. High availability and fault tolerance is built-in and no physical administration is required. Additionally, developers can get productive on SQL Azure quickly by using the same familiar T-SQL based relational model and the same powerful development and management tools used for on-premises databases (excerpt retrieved from http://www.microsoft.com/en-us/sqlazure/database.aspx)

  4. SQL Azure Video • http://www.microsoft.com/en-us/sqlazure/videos.aspx?display=mms://wm.microsoft.com/ms/Windowsazure/SQLAzure_720x480_FINAL_101609.wmv

  5. What do you know about “cloud” technologies?

  6. SQL Challenge #1 • Using EXISTS in your query, list the first and last names of all owners who have a boat in a 40 foot slip.

  7. SELECT FIRST_NAME, LAST_NAME FROM a_OWNER WHERE EXISTS ( SELECT * FROM a_MARINA_SLIP WHERE a_MARINA_SLIP.OWNER_NUM = a_OWNER.OWNER_NUM AND LENGTH = 40 )

  8. SQL Challenge #2 • Using IN in your query, list the first and last names of all owners who have a boat in a 40 foot slip.

  9. SELECT FIRST_NAME, LAST_NAME FROM a_OWNER WHERE OWNER_NUM IN ( SELECT OWNER_NUM FROM a_MARINA_SLIP WHERE LENGTH = 40 )

  10. SQL Challenge #3 • Return owners’ first & last names and rental fees. Be sure to return all owners, but only rental fees that are greater than $2,000

  11. select first_name, last_name, rental_fee from a_owner o left outer join a_marina_slip ms on ms.owner_num = o.owner_num and ms.rental_fee > 2000

More Related