桌子的位置?我一直认为位置是 Database.dbo.Table
但是我看到代码有别的东西代替dbo,像:
DBName.something.Table
有人可以解释一下吗
谢谢.
解决方法
databasename.schemaname.tablename
databasename..tablename
servername.databasename.schemaname.tablename
您可以在MSDN上阅读有关使用标识符作为表名的更多信息:
The server,database,and owner names are known as the qualifiers of the object name. When you refer to an object,you do not have to specify the server,and owner. The qualifiers can be omitted by marking their positions with a period. The valid forms of object names include the following:
server_name.database_name.schema_name.object_name
server_name.database_name..object_name
server_name..schema_name.object_name
server_name…object_name
database_name.schema_name.object_name
database_name..object_name
schema_name.object_name
object_name
An object name that specifies all four parts is known as a fully qualified name. Each object that is created in Microsoft sql Server must have a unique,fully qualified name. For example,there can be two tables named xyz in the same database if they have different owners.
Most object references use three-part names. The default server_name is the local server. The default database_name is the current database of the connection. The default schema_name is the default schema of the user submitting the statement. Unless otherwise configured,the default schema of new users is the dbo schema.