Reply to Re: when to use fully qualified names ([database].[schema].object)

Your name:

Reply:


Posted by John Bell on 12/29/06 18:06

Hi

"fireball" <fireball@onet.kropka.eu> wrote in message
news:en3dv5$6ce$1@atlantis.news.tpi.pl...
> I wihsh to discuss whether to use fully qualified names:
> [database].[schema].object
> of objects to operate (create, query..) on is good or not?
>
In general having at least two part names will reduce the need to work out
the schema and therefore be more efficient. Therefore using two part names
in stored procedure and other code is a good idea.

> If someone change order of sql code blocks in my script - this may cause
> lose of it's context (like: use master / use <mydb>..). I wish to have my
> sript independed on changes like this and always produce correct result.
>
This is assuming that the database name does not change! It may be better
just to organise the scripts so you have separate scripts for each database
and then you only need to worry about setting the database once when making
the connection (-d parameter for osql or SQLCMD ) and there would be no USE
statements at all.

> Does using full name make use of 'use <db>' statement unnecessary?
>

John

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация