|
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?
Navigation:
[Reply to this message]
|