Posts by FeJauM • 23 points
3 posts
-
1
votes1
answer157
viewsQ: How to get the records found and not found via IN
I have a simple command SELECT MATRICULA FROM ALUNOS WHERE ID_ALUNO IN (1,2,3,4,5,6) I would like to know how to get via SQL a result like this: ID| STUDENT 1 | LUIZ 2 | MARIA 3 | 4 | JOÃO 5 |…
-
1
votes1
answer37
viewsA: How to get all lines using duplicate value in IN
I found a way, more complex, but I think it’s the way SELECT NOME FROM PESSOA WHERE ID = 1 UNION ALL SELECT NOME FROM PESSOA WHERE ID = 1 UNION ALL SELECT NOME FROM PESSOA WHERE ID = 1 UNION ALL…
-
0
votes1
answer37
viewsQ: How to get all lines using duplicate value in IN
How do I get all lines using IN(), and inside IN() have duplicate values SELECT NOME FROM PESSOA WHERE ID IN (1,1,1,2,3,3,4) I want in return come 3 times the name of ID 1, and 2 times the name of…