ORA-01427: 单行子查询返回多于一个行
updateMIS_Base.FcltPropertysetValue='1',Text='合'whereFacilityID=(selectridfromMIS_Bas...
update MIS_Base.FcltProperty set Value = '1', Text = '合' where FacilityID = (select rid from MIS_Base.Asset where gid = 212318) and NameEn= 'kgzt'*General SQL error.
ORA-01427: 单行子查询返回多于一个行 展开
ORA-01427: 单行子查询返回多于一个行 展开
展开全部
改一下
update MIS_Base.FcltProperty set Value = '1', Text = '合' where FacilityID in (select rid from MIS_Base.Asset where gid = 212318) and NameEn= 'kgzt'
=只能等于一个值,用in的话就能等于多个值了,
select rid from MIS_Base.Asset where gid = 212318查询结果肯定大于一条,所以数据库无法识别出来,改成in就没问题了
update MIS_Base.FcltProperty set Value = '1', Text = '合' where FacilityID in (select rid from MIS_Base.Asset where gid = 212318) and NameEn= 'kgzt'
=只能等于一个值,用in的话就能等于多个值了,
select rid from MIS_Base.Asset where gid = 212318查询结果肯定大于一条,所以数据库无法识别出来,改成in就没问题了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询