select count(*) into fhave from tab_ppxuser where name = userstr;

select nvl(hphotourl, '0') into photourl from tab_ppxuser where name = userstr;
这两条指令的方法count(*)和nvl(a,b)必须分开写,不然会报错,

方法nal()有两个参数,如nvl(a,b)
a时表的列元素名,b是个替代数据,理论上可以任意数据类型,可是我建议用varchar2的字符串,当查询a返回的结果为null时,将会用b来赋值给结果,这样就可以避免了null返回值

相关文章:

  • 2022-01-11
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
猜你喜欢
  • 2021-12-01
  • 2021-07-25
  • 2021-05-22
  • 2022-01-31
  • 2022-12-23
  • 2021-06-17
  • 2022-02-18
相关资源
相似解决方案