there are three colums in my database table.i need to write a select statement for related to all three columns.
boolean isPresent=statement.execute("SELECT PERSON FROM ID WHERE "
+ "AND (Address=\'abc\'AND lastName=\'xxxx\')");
is this correct?
posted 6 years ago
Difficult to tell, because I don't know what your columns are. The SQL string looks like well-formed SQL, so you will have to try and see what happens when you execute that query at the command line? Have you read the API for java.sql.Statement#execute()?