I want to update the content of a table calls VIDEO_TAGS which contains 3 columns, fk_video_id, principal (not too important), and tag_value.
I want to do an update as follows,
"UPDATE VIDEO_TAGS
SET tag_value= :newTag
where tag_value= :oldTag
and fk_video_id = (SELECT FROM VIDEO_TAGS fk_video_id where tag_value= :productName)"
but it is clear that the sub-query will return many elements, while I only need one element -more than one row returned by a subquery used as an expression ERROR-. my question is how to edit the sub-query to get the one element that I need? Thank you
video_idto(SELECT FROM VIDEO_TAGS, and use(SELECT video_id FROM VIDEO_TAGS(or at least the field that has the id for the video you are looking for)fk_video_id IN (sub-query)instead.)