When creating a table using a script the treeview shown in VS2012 updates the currently selected node rather than the database where the table is created.
To reproduce:-
[Transferring a table from one database to another.]
Open a sql editor for the target database. Use 'Script as Create' for a table in a source database, leave the focus on the source table in the treeview. Cut and paste the source script into the target script editor, editing as required. Execute the target script to create the new table. The contents of the node for the source database in the treeview are replaced with the tables from the target database.
Workaround
Refresh the treeview and all nodes displayed correctly.
To reproduce:-
[Transferring a table from one database to another.]
Open a sql editor for the target database. Use 'Script as Create' for a table in a source database, leave the focus on the source table in the treeview. Cut and paste the source script into the target script editor, editing as required. Execute the target script to create the new table. The contents of the node for the source database in the treeview are replaced with the tables from the target database.
Workaround
Refresh the treeview and all nodes displayed correctly.