Q:

Oracle11g sql can update statement judge some colum is ""

I hava two values picId and tubId and I want to update table A. But first of all, I must check if they are empty i.e "" . I use an update statement twice. I'm wondering if I can use update statement only once to complete this task.
String picId = "";
String tubId = "1";

if(!"".equals(picId)) {
    String update = "update A set columnName=someValue where id=" + picId;
    //this method for update 
    this.executeUpdate(update, new Object[]{});
}
if(!"".equals(tubId)) {
    String update = "update A set columnName=someValue where id=" + tubId;
    this.executeUpdate(update, new Object[]{});
}

Thank you very much!

A:

Dear Jon Snow try to use in like this:
  String update = "update A set columnName=someValue where id in (" + tubId +","+picId+")";

