locked
add a foreign key to a table that has data ? RRS feed

  • Question

  • I have to set up some foreign keys to some tables...  These tables are loaded with data... if I add these keys, how long will it take and will it effect the data in any way ?
    Tuesday, July 21, 2009 2:16 PM

All replies

  • This totally depends upon the size of the table.  If you feel that it would take a lot of time.

    Consider BCP.


    Kris
    Wednesday, July 22, 2009 6:29 AM
  • I have to set up some foreign keys to some tables...  These tables are loaded with data... if I add these keys, how long will it take and will it effect the data in any way ?

    Hi GinaB,
        very quick,if you do not add contraint relation for them.
    Frank.Xu Lei--谦卑若愚,好学若饥
    专注于.NET平台下分布式应用系统开发和企业应用系统集成
    Focus on Distributed Applications Development and EAI based on .NET
    老徐的博客:http://frank_xl.cnblogs.com
    Monday, July 27, 2009 4:57 AM