How to enter newline character in Oracle?

前端 未结 3 587
無奈伤痛
無奈伤痛 2020-12-04 16:27
select col1, col2
    into name1, name2
    from table1
    where col1=col;

        m_sub := \'Subject \';
    m_msg := \'Hello \'||name||\' ,\'||/n||/n||\'Your ord         


        
3条回答
  •  再見小時候
    2020-12-04 16:54

    Chr(Number) should work for you.

    select 'Hello' || chr(10) ||' world' from dual
    

    Remember different platforms expect different new line characters:

    • CHR(10) => LF, line feed (unix)
    • CHR(13) => CR, carriage return (windows, together with LF)

提交回复
热议问题