Is there a way in SQL Server to rename a table in another database? When you are in current database and migrating data over to another database in the TEMP table and then renaming TEMP table in that another database. I do not want to use "USE [database]" since the database name could change on different servers.
Thanks for the help in advance!
MyDB2..sp_renameis simplest by far! – Michel de Ruiter Mar 16 '16 at 11:37