RE: best practive TSQL question

RE: best practive TSQL question

 

  

I always specify owner and only the database name when necessary. As you found, portability becomes an issue if you fully qualify object. Specifying owner saves a catalog lookup because SQL Server will always opt for objects owned by the current user before using ones owned by dbo.

Jay

________________________________

From: Ligda John
Sent: Tue 20-Mar-07 13:27
To: LazyDBA Discussion
Subject: best practive TSQL question


What are some pros and cons to citing database.owner. before table names
in stored procedures, udfs, and views?

I used to always do this as a point of precision and style. But if
objects are migrated to another DB there is a lot of extra work.

Any feedback or thoughts?

John


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


MS Sql Server LazyDBA home page