Quantcast
Channel: Answers for "Fully Qualified Table Name"
Viewing all articles
Browse latest Browse all 4

Answer by Jeff Moden

$
0
0
The correct answer is that you should ALWAYS use the two part naming convention as Timothy suggested but not just for the reason he stated.... there are also reasons for performance. When you use just the table name, rumor has it that SQL Server first looks to see if there's a table under the schema for the name of the user. If there is none, it supposedly looks in master next. When it doesn't find one there, then it finally looks in the current DB in the "dbo" schema. For batch jobs, that's not so bad. For GUI code, that represents a substantial amount of time. Always always always use the 2 part naming convention. If 3 or 4 parts are required, then instantiate a couple of synonyms so you can get back down to the two part naming convention. That way if a database name or a linked server name changes, you don't need to find all the places in code to change it... you just need to change the synonym (or passthrough view),

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images