Home>Article>Database> Why is the prefix of sql table dbo

Why is the prefix of sql table dbo

清浅
清浅 Original
2019-05-09 15:34:07 3711browse

The reason why the prefix of sql table is dbo: dbo is the default user of the database, which has the permissions of the owner. Defining objects through dbo enables any user in the database to reference them without having to provide an owner name.

Why is the prefix of sql table dbo

DBO is the default user for each database and has owner permissions, that is, DbOwner. By defining an object with a DBO as the owner, it can be referenced by any user in the database without having to provide the owner name.

(Video tutorial recommendation:mysql video tutorial)

For example: you log in as User1 and create a table without specifying DBO. When user User2 logs in and wants When accessing a Table, you must know that this Table was created by User1, and write User1.Table. If he does not know that it was created by you, there will be problems with access.

If you point the owner to Dbo when you create the table, then other users can just write Dbo.Table when they come in. There is no need to know User1.

This is not only true for tables, but also when creating database objects such as views.

The above is the detailed content of Why is the prefix of sql table dbo. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn