2 added 28 characters in body
source | link

I currently have to take over an old project and found a single view that's kind of a special snowflake because it's declared this way:

USE [DbName]
GO

create view [abc].[vXyz] as
select id, name, etc
from [DbName].[abc].[xyz]

Is there any good reason to do this? Only thing I could maybe think of is that this view is/was maybe also accessed from another database and whoever wrote it thought they would need to declare it this way to work properly, but as far as I'm aware it's not.

I currently have to take over an old project and found a single view that's kind of a special snowflake because it's declared this way:

create view [abc].[vXyz] as
select id, name, etc
from [DbName].[abc].[xyz]

Is there any good reason to do this? Only thing I could maybe think of is that this view is/was maybe also accessed from another database and whoever wrote it thought they would need to declare it this way to work properly, but as far as I'm aware it's not.

I currently have to take over an old project and found a single view that's kind of a special snowflake because it's declared this way:

USE [DbName]
GO

create view [abc].[vXyz] as
select id, name, etc
from [DbName].[abc].[xyz]

Is there any good reason to do this? Only thing I could maybe think of is that this view is/was maybe also accessed from another database and whoever wrote it thought they would need to declare it this way to work properly, but as far as I'm aware it's not.

1
source | link

Any reason for declaring a view with cross-database SELECTs for the same database?

I currently have to take over an old project and found a single view that's kind of a special snowflake because it's declared this way:

create view [abc].[vXyz] as
select id, name, etc
from [DbName].[abc].[xyz]

Is there any good reason to do this? Only thing I could maybe think of is that this view is/was maybe also accessed from another database and whoever wrote it thought they would need to declare it this way to work properly, but as far as I'm aware it's not.