Home > database >  Oracle trigger, a table at the time of entry, the value of a field how to directly fetch another tab
Oracle trigger, a table at the time of entry, the value of a field how to directly fetch another tab

Time:10-04

Two tables, I want to insert value, the value of a field directly from existing another table of the value of the field, how to value or use SQL statements

CodePudding user response:

Update a set a.c ol1=(select col2 from b where Anderson, d=b.i d); Request the subquery return as line, multi-line complains

CodePudding user response:

reference 1st floor js14982 response:
update a set a.c ol1=(select col2 from b where Anderson, d=b.i d); Requires the subquery return value line, multi-line complains if


Add an and rownum=1


The landlord to provide the information is too little, don't know what he want to do,

CodePudding user response:

1/f method
To note, however, does not satisfy the condition, col1 will be updated to NULL
  • Related