Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1377 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     .NET and MSSQL :

What is foreign key?

Thread title: What is foreign key?
Closed Thread    
    Thread tools Search this thread Display Modes  
12-18-2007, 10:37 PM
#1
Luk3 is offline Luk3
Luk3's Avatar
Status: Senior Member
Join date: Nov 2006
Location: Colchester, UK
Expertise:
Software:
 
Posts: 760
iTrader: 3 / 100%
 

Luk3 is on a distinguished road

Send a message via MSN to Luk3

  Old

Yeah usually the foreign key is the primary key from another table.

Say you have a customer table and the headers are:
Customer ID [Primary]
Customer Name
ETC

and then you have an Orders table:
Order ID [Primary]
Order item
Customer ID [Foreign]

The tables link via the foreign key. Creates a relationship, Referential Intergrity FTW! ;D

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed