Firstly I'm a complete newbie when it comes to SQL Server. I have five SQL Server databases, in all of them except one I can easily do say...
SELECT TOP 10 * FROM dt_Organizers
However one of the new databases require me to do this:
SELECT TOP 10 开发者_JS百科* FROM dbuser.dt_Organizers
Note that all the tables in all databases have "dbuser" "dbamy" "dbyon" "dbmio" "dbcana" prefixes respectively, this never caused a problem before. Now if I use the query without doing dbuser.dt_Organizers it brings up:
Warning: mssql_query()
[function.mssql-query]: message: Invalid object name 'dt_Organizers'.
I think you should have a look at
- Understanding the Difference between Owners and Schemas in SQL Server
- SQL SERVER – Importance of Database Schemas in SQL Server
精彩评论