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" ? > >experimental s-a constatat ca nu merge varianta de mai jos: >mysql> select distinct ID from tools where tool like '%ABC%' and tool >like '%DEF%'; >Empty set (0.01 sec) > > > > >--- >Detalii despre listele noastre de mail: http://www.lug.ro/ > > > > ceva de genul SELECT tabela.* FROM tabela INNER JOIN tabela as AS ON tabela.id = t2.id WHERE tabela.tool = 'ABC' AND t2.tool = 'DEF';
-- Attached file included as plaintext by Ecartis -- -- File: signature.asc -- Desc: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBGLrRRZBYwhawvi4RApPtAKCRQyZz8KvlwXuCcrLMviRumEaEWACgjPbd jWD0lzeV2jj/yhMmOxt9VTs= =nJqd -----END PGP SIGNATURE----- --- Detalii despre listele noastre de mail: http://www.lug.ro/
