You are here: Re: SQL Join with unknown tables - but it works!?! « MsSQL Server « IT news, forums, messages
Re: SQL Join with unknown tables - but it works!?!

Posted by David Portas on 11/14/05 15:40

refDROP_VALUES_1 and refDROP_VALUES_2 are referenced first as owner
(schema) names, specifically the owner names of the two tables called
Drop_Value.

Those same names (refDROP_VALUES_1 and refDROP_VALUES_2) are then used
as aliases for another table owned by dbo (dbo.refDROP_VALUES). This is
very confusing naming but is perfectly legal if all the tables exist.
To demonstrate, try:

SELECT TOP 10 * FROM refDROP_VALUES_1.Drop_Value
SELECT TOP 10 * FROM refDROP_VALUES_2.Drop_Value
SELECT TOP 10 * FROM dbo.refDROP_VALUES

Lookup Owner Names in Books Online if you haven't come across two-part
names before.

--
David Portas
SQL Server MVP
--

 

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

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