Jump to content
Fórum Script Brasil
  • 0

Saber de onde veio resultado


Vinicius Albino

Question

1 answer to this question

Recommended Posts

  • 0
Boa noite,estou tentando fazer uma consulta no banco bem simples:

SELECT Id FROM Programacao WHERE Data1 = '2011-09-17' OR Data2 = '2011-09-17'
Eu preciso saber da onde veio o resultado,por exemplo, Data1 tem essa informação,como eu sei que ela veio de data?
Simplesmente mudando seu código para que fique assim:
SELECT Id,
IF(Data1 = '2011-09-17', 'VEIO DA DATA1', 'VEIO DA DATA2')
FROM Programacao WHERE Data1 = '2011-09-17' OR Data2 = '2011-09-17'

Link to comment
Share on other sites

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.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...