Home > database > Oracle SQL statements will one die is zero update into another column values, not to 0 has a value n
Oracle SQL statements will one die is zero update into another column values, not to 0 has a value n
Time:10-01
As shown in figure, as shown in the table openprice zero value in a column in the modified into precloseprice values, Requirement is that each line openprice values and corresponding precloseprice values, not zero does not need to be modified,
CodePudding user response:
update t set openprice=precloseprice where openprice='0';
The name of the table it ourselves
CodePudding user response:
The update t set openprice=precloseprice where openprice='0'; You this statement is wrong, after the execution, precloseprice value is 0, Its unless that's what I was writing, but after execution, the result is wrong, I am in PLSQL,