Help needed in understanding the below update statement
According to me result expect one and only one value from temp.tally
but it is returning 2 values and the update is working perfectly
updating 2 records.
why I am confused is because I have back ground of Oracle sql plsql and in Oracle
update this is not possible it will give error stating too many rows.
can any body explain me this update statement
Thanks
aak.
Code:
update results_key set result = temp.tally from( select testid,result,count(*) as tally from reslults_emp where testid='e001' ) temp where resluts_key.testid=temp.testid and results_key.value=temp.result
According to me result expect one and only one value from temp.tally
but it is returning 2 values and the update is working perfectly
updating 2 records.
why I am confused is because I have back ground of Oracle sql plsql and in Oracle
update this is not possible it will give error stating too many rows.
can any body explain me this update statement
Thanks
aak.
Comment