This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
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()?