java - (JDBC) Mysql query with if statement and multiple conditions -
what proper syntax mysql-java statement such 1 ?
preparedstatement st =connection.preparestatement("select name, value, quantity sales if (type=='purchase' , state=='confirmed') or (type=='sale' , state=='not confirmed')) ;
the sql like:
select name, value, quantity sales (type = 'purchase' , state = 'confirmed') or (type = 'sale' , state = 'not confirmed');
Comments
Post a Comment