I am working with a JDBC and am trying to figure out how to dynamically create queries - which is proving to be a rather challenging feat. What input can I put in a SQL query to have it return any input for a given column?
For example,
SELECT * FROM customers WHERE name = ?;
Essentially I want the previous statement to match
SELECT * FROM customers;
Instead of replacing the "Where name = ?", is there anything I can replace the ? with to get the database to return all rows with any value in the name column?
This is probably going to sound really stupid but I tried this,
SELECT * FROM customers WHERE name = *;
but that unfortunately did not work.