Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

primary key and foreign key

  Asked By: Anubis    Date: Nov 28    Category: MS Office    Views: 981
  

i have used more no of table,i have set pkey and fkey

i enter values in first table, after that i have enter values in 2'nd table
at a time,how to set foreign key in the 2'nd table aotumaticaly ( first table
pk=2'nd table fk)
If any possible do to this way, please help me, i have using sql stored
procedure .

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Jeanne Lawson     Answered On: Nov 28

This is a matter between you and the database. :-)

You haven't said what brand of database engine you're accessing, and it WILL
make a difference. In Access and others, you usually define foreign keys in
the records and the database takes care of the rest. In Sybase, you need to
define them separately and then update them independently (I think), but you
can do this using triggers.

No matter what, though, it's something you need to do on the database side,
not the Excel VBA side.

 
Answer #2    Answered By: Reamonn Fischer     Answered On: Nov 28

I have using sql  server 2000 database,

i have used more no of table,i have set  pkey and fkey

enter  values in first table, after that i have enter values  in 2'nd
table at a time,how to set foreign key  in the 2'nd table  aotumaticaly (
first table pk=2'nd table fk)
If any possible do to this way, please help  me, i have using sql stored
procedure .

 
Didn't find what you were looking for? Find more on primary key and foreign key Or get search suggestion and latest updates.




Tagged: