Adding a line break in MySQL INSERT INTO text

后端 未结 10 2088
太阳男子
太阳男子 2020-12-07 22:07

Could someone tell me how to add a new line in a text that I enter in a MySql table?

I tried using the \'\\n\' in the line I entered with INSERT I

10条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 22:23

    in an actual SQL query, you just add a newline

    INSERT INTO table (text) VALUES ('hi this is some text
    and this is a linefeed.
    and another');
    

提交回复
热议问题