sql - How to update when subquery returns multiple rows (with cursor) -


update tac_master    set msg = (select 'yes,this 4g supportive handset.marketing name'||mkt_name||' of lte:1800 manufacturer#'||manufacturer                tac_master) lte_1800='yes'; 

attached table data , structuretable sample

as code specified, change subquery value updating constant value - dont't need query again mkt_name , manufacturer values they're available in update statement:

update tac_master set msg = 'yes,this 4g supportive handset.marketing name'||mkt_name||' of lte:1800 manufacturer#'||manufacturer lte_1800='yes'; 

as general question updating row while subquery returning multiple values - can't, that's why error, oracle has know value current has modified , doing way you're not defining it


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -