Elizabeth.J.Doering at wellsfargo.com
Elizabeth.J.Doering at wellsfargo.com
Wed Jul 30 16:48:02 CDT 2008
Like you, I believe in naming foreign keys the same as the primary key in the primary table. For example, the table Activity has primary key ActivityID and in the table ActivityPermission you will find ActivityID as the foreign key that relates back to Activity.ActivityID.) SQL Server 2005 certainly has no problem. I suspect 'helpfulness'. Liz -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Wednesday, July 30, 2008 4:36 PM To: SQL Server List Subject: [dba-SQLServer] Must Relating Fields Have Different Names? I just went through my first shot at upsizing an mdb using SSMA. SSMA changed all the foreign key names to something different. In Access, I've been keeping the Foreign Key field names identical to the field it is related to for ease of programming. I often need to be explicit about which table the field is in, but not a big deal. What would be a big deal for me is to change all the foreign keys to unique names! Then, instead of 'MainID = " & txtMainID, txtMainID could be equal to a variety of different field names. Are different names required in SQL Server? Or is SSMA just trying to be 'helpful'? Thanks! Dan _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.