drv <- dbDriver("MySQL")
con <- dbConnect(drv, group = "group")
rs <- dbSendQuery(con,
"delete * from PURGE as p where p.wavelength<0.03")
if(dbGetInfo(rs, what = "rowsAffected") > 250){
warning("dubious deletion -- rolling back transaction")
dbRollback(con)
}
Run the code above in your browser using DataLab