Reply to Bizarre Query

Your name:

Reply:


Posted by Xeth Waxman on 07/05/06 22:30

Good afternoon,

I have a bizarre question. When running the following query:

select SomeColumnName from TableA where PK_TableA in
(select PK_TableA from TableB)

I get results. This should not be feasible, because the query within
the in clause:

select PK_TableA from TableB

is not possible - there is no PK_TableA column within the TableB table.
Running the sub-query alone gives an error, but when using it as
sub-query in the first statement, I get every row within TableA.

If it helps any, the exact query I'm running is:

select demonstratorid from DirectSalesAgent where DirectSalesAgentId in
(select directsalesagentid from WebsiteSubscriptionPayment)

Shouldn't a query return an error if the sub-query has an invalid
column name?

[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

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