Sql-server – Any reason for declaring a view with cross-database SELECTs for the same database

database-designsql serversql-server-2008-r2view

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.

Best Answer

There is no need to specify the database if the view is in the same database. And the view will work even if it is referenced by a different database.

So no no good reason of specifying the database when you are in the same database.