Home > database > I ask if there is any update table set=variable specific examples
I ask if there is any update table set=variable specific examples
Time:09-21
I use cursor to cycle to the fields in the table when no error, can't afford to change is not
CodePudding user response:
Picture too took me the SQL type hand
Declare Acc_id vchar2 (50); Acc_name vchar2 (100); Cursor update_name is the select acc_id, acc_name The from aa where filler='cq'; The begin The open update_name; Loop The fetch update_name Into acc_id acc_name; If update_name % NOTFOUND THEN The EXIT The UPDATE bb set ACC_NAME=ACC_NAME WHERE FILLER2='cq and ACC_ID=ACC_ID; End the if; End loop; commit; The close update_name; end;
CodePudding user response:
Variable names and field name
CodePudding user response:
- 1. The update syntax The update table name set column name=new value where the column name=one value;
- 2. For example: The update bb set acc_name='33837011' where filler2='cq' and acc_id='qq_33837011';