"0000" consecutive zeros cannot be saved to the oracle database in the form of a string

question background

A field type in both the database table and the entity class is a string type, but in the case of consecutive zeros, the actual storage in the database is "0"-zero.

try

  • has tried non-zero numbers, which is normal, so consider whether it is caused by some policy of ORACLE
  • .
  • tried to add a space "0000" to the beginning and end, which is also invalid

expected answer

  • whether there is a strategy for oracle: for the data character type "0000000." Do the head and tail blanks and then re-operate?
  • how can I avoid this strategy if I want to implement data with an error format of "0000"?
Jul.06,2021

  1. Please give a simplified version of the code that can reproduce the problem
  2. including table statement

it is recommended to insert a record directly into the database to see if it is saved properly to confirm whether the data changes are on the application side or the database side.

oracle does not process the values of character fields, so you can check whether there is a custom trigger on the table.

Menu