Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Foreign Keys in SQL Server: What They Are and How to Use Them

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
5,015
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 25, 2010

This video is part of LearnItFirst's Transact-SQL Programming: SQL Server 2008/R2 course. More information on this video and course is available here:

http://www.learnitfirst.com/Course/161/SQL-Programming-2008.aspx?an=YouTube

This is the first video in a two-video set on foreign keys. The foreign key is probably the most confusing of the constraint types, but the examples in these videos will help clarify what it's used for and how to use it. To demonstrate foreign keys, Scott uses a scenario in which users can recover a lost password with a password hint and answer.

Highlights from this video:

* What is the purpose of foreign keys?
* Differences between primary keys and unique constraints
* Parent/child relationships
* Defining a "one to many" relationship

and much more

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (3)

Sign In or Sign Up now to post a comment!
  • @HeathDutton Kevin Flynn ?

    

  • i want to add field and the table has forign key do I include the forign key in sql statement or not ?

    and if yes how do u write it?

  • Sounds like being taught by the guy from Tron!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more