El problema es que no me anda, y eso que tengo una version 4.01 y en el manual dice que a partir de las 4.x deberia andar.
BAsicamente, este es el texto, y las pruebas que realice son iguales, solo cambie el nombre de las tablas:
Cita:
A alguien le anda esto? MySQL currently only supports nested queries of the form INSERT ... SELECT ... and
REPLACE ... SELECT .... You can however use the function IN() in other contexts. Subselects
are scheduled for implementation in Version 4.x.
Meanwhile, you can often rewrite the query without a sub-select:
SELECT * FROM table1 WHERE id IN (SELECT id FROM table2);
This can be re-written as:
SELECT table1.* FROM table1,table2 WHERE table1.id=table2.id;
REPLACE ... SELECT .... You can however use the function IN() in other contexts. Subselects
are scheduled for implementation in Version 4.x.
Meanwhile, you can often rewrite the query without a sub-select:
SELECT * FROM table1 WHERE id IN (SELECT id FROM table2);
This can be re-written as:
SELECT table1.* FROM table1,table2 WHERE table1.id=table2.id;