The data queried by java export excel is '01' and becomes 1 after exporting the excel form

Solution:

Just add a space after the data to be queried (prerequisite: the data is of string type)

For example:

Use || to concatenate strings

select '01' || ' ' from dual

Use CONCAT to concatenate strings

select  CONCAT('01', ' ')  from dual

In the above example to concatenate strings, the data is of string type, what if the data is of Integer type?

The Integer needs to be converted into a string first, and then concatenated using the CONCAT function. You can use the TO_CHAR function to convert the Integer type to a string

SELECT CONCAT(TO_CHAR(Integer类型字段), '拼接的字符串')  FROM 表;

Guess you like

Origin blog.csdn.net/SUMMERENT/article/details/130707826