sql - How to pass multiple command in one query? -



sql - How to pass multiple command in one query? -

hi how can write code below more simply? ... 2 sql(oledb) command in 1 query.

con.open(); cmd.commandtext = "delete * customers id_c = 1"; cmd.executenonquery(); cmd.clone(); cmd.commandtext = "delete * books id_b = 1"; cmd.executenonquery(); cmd.clone(); con.close();

provided don't need number of rows affected (returned executenonquery) can set both commands in same sql separated ";"

con.open(); cmd.commandtext = "delete * customers id_c = 1; delete * books id_b = 1"; cmd.executenonquery(); con.close();

sql wpf

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -