This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread 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 "
+ "ID=1"
+ "AND (Address=\'abc\'AND lastName=\'xxxx\')");
is this correct?
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32692
4
posted
0
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()?