如果mytable表中不存在 ID = 123 的数据,那么
SELECT Flag INTO flag FROM mytable WHERE ID = 123 将抛出异常ORA-01403
SELECT nvl(max(Flag),'') INTO flag FROM mytable WHERE ID = 123 则不会有异常
具体参考:
SEEKER |
|
||
Copyright © 2024 sundigang
Powered by .NET 9.0 on Kubernetes |