Basic query of Database

0

My query is about how to do an update to update several columns at the same time, work with java and mysql.

 stat.executeUpdate("Update producto set Prod_nombre= '"+Nom+"' , 
 Prod_precio="+pre+" , Prod_existencia="+exis+" , Prove_id= " +prove+"where 
 Prod_id="+cod);
    
asked by Hector 08.03.2018 в 05:05
source

1 answer

0

It would be alo like that for example ..

stat.executeUpdate ("Update product set Prod_name = '" + Nom + "', Prod_price = '" + pre + "', Prod_existence = '" + exis + "', Prove_id = '" + prove + "' where Prod_id = ' "+ cod +" '");

    
answered by 08.03.2018 в 19:52