MySQL Forums
Forum List  »  General

Re: Problem with refering column from double nested subquery
Posted by: Ert ong
Date: September 25, 2013 12:45AM

Sorry, if it was ambiguous.

All these queries was made as simple as possible. All of them can be obviously rewritten to the simplest ones, for example in a way you showed.

All these queries are intended only to show the concept.

SELECT *, (SELECT * FROM (SELECT D.date ) B ) A
FROM Date D;

Assume you need to write a query, that have structure like this. That is for every row of some table Date, we need to query something that can be queried only using query with subquery that refers to the some column of the very first table.

And provided query shows, that MySQL will not allow us to do this.

Provided example query is weird, I agree.
But such query should be executed without errors.
But there is a error: Unknown table 'D' in field list.

Options: ReplyQuote


Subject
Written By
Posted
Re: Problem with refering column from double nested subquery
September 25, 2013 12:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.