List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:January 15 2003 7:40pm
Subject:Re: Confirmation of SELECT...IN syntax
View as plain text  
In the last episode (Jan 15), Doug Beyer said:
> It's my understanding that embedded selects are NOT allowed in MySql. Is this
> correct?
> 
> Example:
> 
> SELECT t1.* 
> FROM table1 t1 
> WHERE ( t1.Id IN ( SELECT t2.Id FROM table2 t2 ) )

Correct.  Your example can easily be converted to a join, though.

SELECT t1.* from table1 t1, table2 t2 where t1.id=t2.id

-- 
	Dan Nelson
	dnelson@stripped
Thread
Confirmation of SELECT...IN syntaxDoug Beyer15 Jan
  • Re: Confirmation of SELECT...IN syntaxDan Nelson15 Jan
RE: Confirmation of SELECT...IN syntaxGeoffrey Hoffman15 Jan
  • Re: Confirmation of SELECT...IN syntaxJeremy Zawodny15 Jan
  • Re: Confirmation of SELECT...IN syntaxZak Greant16 Jan