I have the following sentence that helps me to update the fields of a detail_dulce table that collects only numerical values
update producto
inner join detalle_dulce on detalle_dulce.idp = producto.idp
inner join existencia on producto.idp = existencia.idp
inner join codigo_barras on detalle_dulce.idp = codigo_barras.idp
set detalle_dulce.categoria = (select idc from categoria where nombre = 'dulce'), detalle_dulce.subcategoria = (select idsub from subcategoria where nombre = 'chocolate'), detalle_dulce.proveedor = (select idpr from proveedor where proveedor = 'berny'), existencia.cantidad = existencia.cantidad + 30
where producto.idp = 1551;
The problem is that when I run the error appears
Error Code: 1242. Subquery returns more than 1 row