You are here: Re: when to use fully qualified names ([database].[schema].object) « MsSQL Server « IT news, forums, messages
Re: when to use fully qualified names ([database].[schema].object)

Posted by fireball on 01/02/07 15:58

Uzytkownik "Erland Sommarskog" <esquel@sommarskog.se> napisal w wiadomosci

> Use two-part names, not three-part names.
but why??


I wisht to say, for example:

SELECT * FROM somebase.sys.schemas
WHERE name = N'someschema'

or (- I don't know which query will be more proper, to obtain schema of
given database):

SELECT * FROM somebase.INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = N'someschema'

but without saying:
USE somebase


- (why) is that wrong solution?
hint: I parametrize my database name in my scripts.

 

Navigation:

[Reply to this 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

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