SQL点符号

前端之家收集整理的这篇文章主要介绍了SQL点符号前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有人可以向我解释sql Server如何使用点符号来识别
桌子的位置?我一直认为位置是 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.

猜你在找的MsSQL相关文章