设计很差。你怎么设计时连字符型和数值型都不分啊?这样迟早会出事的。另外
set @re_tmh=(select distinct (rtmh)
from db4 where btmh=@B_tdh or cast(bdjh as varchar(7))=@b_tdh )
这样的语句也不保险。万一select的结果有多条怎么办?
set @re_tmh=(select distinct (rtmh)
from db4 where btmh=@B_tdh or cast(bdjh as varchar(7))=@b_tdh )
这样的语句也不保险。万一select的结果有多条怎么办?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货