Why doesn't ORACLE allow consecutive newline characters in commands?

后端 未结 3 727
星月不相逢
星月不相逢 2021-01-02 13:26

I write:

CREATE TABLE Person ( 
name CHAR(10),

ssn INTEGER);

and save it to a file "a.sql".

If I then run it by typing &quo

3条回答
  •  情深已故
    2021-01-02 13:41

    But if you are wanting to insert multiline text in a varchar2 or a clob field, you may use chr(10)

     insert into t values ('Hello,'||chr(10)||chr(10)||' How are you?');
    
     insert into t values (
     'Hello,
    
     How are you');   
    

    will not work for reasons explained above.

提交回复
热议问题