Jump to content
Fórum Script Brasil
  • 0

Consulta Where And


Question

Pessoal preciso fazer uma consulta simples mas não estou obtendo resultado, tenho a seguinte tabela

---------------
|  ID  | TID  |
---------------
|  56  | 2    |
---------------
|  58  | 2    |
---------------
|  25  | 8    |
---------------
|  25  | 2    |
---------------
|  12  | 9    |
---------------
|  18  | 2    |
---------------
|  45  | 10   |
---------------
|  35  | 2    |
---------------
|  18  | 8    |
---------------

Minha consulta 
 

SELECT
ID
FROM
table
WHERE TID = 2 and TID = 8
GROUP BY ID

resultado esperado
25 e 18

 

Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Cloud Computing


  • Forum Statistics

    • Total Topics
      148692
    • Total Posts
      644525
×
×
  • Create New...