4.0.18 does not support subqueries. You need 4.1 for that. In 4.0.18, you'd write this as a JOIN

  SELECT t1.* FROM table t1
  JOIN table t2 ON t1.id = t2.id
  WHERE t2.one = 4;

By the way, I assume that was a made up example, as it really doesn't require either a subquery or join:

  SELECT * FROM table WHERE one = 4;

would do the same thing.

See the manual for suggestions on rewriting subqueries as joins <http://dev.mysql.com/doc/mysql/en/Rewriting_subqueries.html>.

Michael

N. Kavithashree wrote:

hello,

i m working on mysql version 4.0.18 .the documentation given for this
version will show subquries syntax which whill not work practically.

i urgently want help in this regard. can anybody mail me how can we write
the subquries in mysql version 4.0.18 ?

Eg. select * from table as t1 where id IN (select id from table as T2
where one = 4 );

this syntax will not work.....how to go ahead

or

which version documentation i can refer?

====================================================
N. Kavithashree
===================================================



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to