Throw exception if sqlQuery and deleteTable set and added test for this.