Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nomadsoul
Yak Posting Veteran
89 Posts |
Posted - 2006-12-05 : 18:11:16
|
| Good day everyone,Now that I have my tables loaded each with a proper identity column, I want to ask: Is it good sql programming procedure to insert foreign keys into all the tables at once using a stored procedure? Or is it commonly done?It is better to be prepared and not have an opportunity than to not be prepared and have an opportunity |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-05 : 23:28:00
|
| What do you mean by inserting foreign keys? Do you mean to define FK on desired tables?Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
nomadsoul
Yak Posting Veteran
89 Posts |
Posted - 2006-12-06 : 11:30:18
|
| Yes, defining fk's. Sorry my reply is so lateIt is better to be prepared and not have an opportunity than to not be prepared and have an opportunity |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-06 : 11:41:53
|
| In my opinion, you should have complete database schema ready before writing any code. Adding foreign keys on the table in ad-hoc way as and when required is not at all good. So the answer to your question is YES.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
|
|
|