如何在shell脚本中检查mysql查询的空结果

如何在shell脚本中检查mysql查询的空结果,mysql,shell,Mysql,Shell,如何在shell脚本中检查mysql查询结果是否为null,例如 在以下情况下,如果可能的话,在其他情况下,感谢您的帮助 value2=`mysql -uroot -proot -Dproject_ivr_db -rN --execute "SELECT AcctualFormat FROM meritlist_date wHERE Discipline='phd' AND FeeSubmissionDate='$value'"` 查询为null是什么意思?为什么要传递shell命令?我

如何在shell脚本中检查mysql查询结果是否为null,例如 在以下情况下,如果可能的话,在其他情况下,感谢您的帮助

 value2=`mysql -uroot -proot -Dproject_ivr_db -rN --execute "SELECT AcctualFormat FROM
 meritlist_date wHERE Discipline='phd' AND  FeeSubmissionDate='$value'"`

查询为null是什么意思?为什么要传递shell命令?我的意思是在变量value2中检索到的数据是否为null?我该怎么查呢