List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:April 15 2003 7:35pm
Subject:Re: When will we be able to write such queries??
View as plain text  
In the last episode (Apr 15), Inandjo Taurel said:
> hi,
> i wanted to know from which version will we be able to issue queries like:
> - "select * from table1 where field1 not in (select * from table2)"

This can be rewritten as a left join

> -  "select * from table1 where field1 in (select * from table2)"

Same here

> - "select * from table1 where field1=(select field2 from table2 where ...."

This is the easiest.  "SELECT table1.* from table1,table2 where
table1.field1=table2.field2 and ..."
> We are actually porting an application written for DBase 4 to mysql, and we 
> are facing a lot of issues concerning the non-supporting of some features 
> by mysql database (particularly the in/not in statements, the subselects 
> and the nested queries! ).
> Thanks.

Mysql 4.1 (currently in alpha) suports subselects, although not very
efficiently yet.

	Dan Nelson
When will we be able to write such queries??Inandjo Taurel15 Apr
  • Re: When will we be able to write such queries??Dan Nelson15 Apr