Alin Nastac wrote:

>mocanu silviu wrote:
>  
>
>>salut!
>>se da un tabel mysql de genul :
>>+----------------|---------+
>>|          id        | tool     |
>>+----------------|----------|
>>|         25        | ABC   |
>>|         25        | DEF    |
>>|         24        | ABC   |
>>
>>cum ar trebui sa arate un select care sa returneze acele "id" pentru 
>>care acelasi exista si linii cu tool="ABC" si  tool="DEF" ?
>>
>>
>>    
>>
>corectie:
>SELECT tabela.* FROM tabela INNER JOIN tabela AS t2 ON tabela.id = 
>t2.id WHERE tabela.tool = 'ABC' AND t2.tool = 'DEF';
>  
>


--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui