There are other questions in this context, but I am lazy on the subject and I do not understand. With this, I need help.
I have SELECT
for searching data in a ORACLE
database, however I need to make a IF
condition within this SELECT
.
Example:
I have the following SELECT
:
SELECT
CAMPO1, CAMPO2, CAMPO3, CAMPO4, CAMPO5
FROM
TABELA1
WHERE
CAMPO1 = dado1 AND CAMPO2 = dado2
The condition would look like this:
IF CAMPO1 IS NULL, CAMPO1 = CAMPO3
Is it possible to do this condition within this SELECT
?
I have researched this, found some examples, but I could not understand.
If anyone can help me.