Answer the question
In order to leave comments, you need to log in
How to select all records if the WHERE condition is not received?
For example, there is a request SELECT * FROM tabletest WHERE id=1
id that comes as a parameter, how to leave the same request structure, but select all values. Is there a replacement * in the condition.
For exampleSELECT * FROM tabletest WHERE id=*
Answer the question
In order to leave comments, you need to log in
build normally requests with the help of builders and not suffer.
Alternatively, you can use the OR condition. But in this case, you will have to pass the same id twice in the request. You will get something similar to this:SELECT * FROM tabletest WHERE id=? OR '*'=?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question