Is dbo.dbo really?

Is this really dbo.dbo, if so, what does it mean? I noticed this on a query someone wrote:

from dbo.tmp_BDCode aob inner join dbo.dbo.tmp_BDCode_03 ao

Will this negatively affect the request, because it dbosimply means its global object.

Thanks to everyone for clarifying this.

+3
source share
1 answer

May be a database with a name dboor a schema with a name dbo.dboor a table with a name dbo.tablename.

These commands are valid:

create database dbo
use dbo
create schema [dbo.dbo]
create table [dbo.dbo].[dbo.tablename] (id int, name varchar(10))

select * from [dbo.dbo].[dbo.tablename] as dt
select * from dbo.[dbo.dbo].[dbo.tablename] as dt

This definitely negatively affects the fact that it is not clear enough for programmers who subsequently have to read this source code.

+2
source

Source: https://habr.com/ru/post/1765825/


All Articles