Convert dependencies to point to View instead of Table
I currently have a SQL Server 2008 database in which I am planning to separate out some tables to other databases. I want to be able开发者_StackOverflow社区 to replace all references to the separated tables from the original database using views. Is there a better way (other than manually changing all FK and SProc references) to switch all the dependencies to reference the view instead of the table?
Usually the best course is to rename the tables and then name the view what the table used to be named.
You can try using sp_rename to change the name of the tables. I don't know if this will change your references also.
精彩评论