How would you query a table where the id number is an even number? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How would you query a table where the id number is an even number?

The query has to output all columns with an even id number.

16th Jul 2021, 8:50 PM
Olwethu Shezi
Olwethu Shezi - avatar
2 Answers
+ 2
Olwethu Shezi Use MOD function in where clause like: MOD(id, 2) = 0
17th Jul 2021, 3:48 AM
A͢J
A͢J - avatar
0
Describe your table structure first. How can anyone help you without knowing the table structure?
17th Jul 2021, 12:58 AM
Ipang