加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

SQL点符号

发布时间:2020-12-12 08:48:51 所属栏目:MsSql教程 来源:网络整理
导读:有人可以向我解释SQL Server如何使用点符号来识别 桌子的位置?我一直认为位置是 Database.dbo.Table 但是我看到代码有别的东西代替dbo,像: DBName.something.Table 有人可以解释一下吗 谢谢. 解决方法 这是一个数据库模式.一张桌子的三部分名称是: databas
有人可以向我解释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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读