没问题.sql windows里的数据是不分行展示的.在command windows可以清楚的看出是回车不是空格. SQL> create table test (name varchar2(100));
Table created
SQL> insert into test as select 'gg' || chr(13) || 'd' a from dual;
insert into test as select 'gg' || chr(13) || 'd' a from dual
ORA-00926: 缺失 VALUES 关键字
SQL> insert into test select 'gg' || chr(13) || 'd' a from dual;
1 row inserted
SQL> select * from test;
NAME -------------------------------------------------------------------------------- gg d
SQL>
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Nov 15 17:37:05 2010Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production With the Partitioning, Data Mining and Real Application Testing optionsSQL> select 'as'||chr(10)||'12' from dual;'AS'| ----- as 12 SQL> select 'as'||chr(13)||'12' from dual;'AS'| ----- 12SQL> 好像13不可以啊
SQL> create table test (name varchar2(100));
Table created
SQL> insert into test as select 'gg' || chr(13) || 'd' a from dual;
insert into test as select 'gg' || chr(13) || 'd' a from dual
ORA-00926: 缺失 VALUES 关键字
SQL> insert into test select 'gg' || chr(13) || 'd' a from dual;
1 row inserted
SQL> select * from test;
NAME
--------------------------------------------------------------------------------
gg
d
SQL>
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Nov 15 17:37:05 2010Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, Data Mining and Real Application Testing optionsSQL> select 'as'||chr(10)||'12' from dual;'AS'|
-----
as
12
SQL> select 'as'||chr(13)||'12' from dual;'AS'|
-----
12SQL>
好像13不可以啊
'AS'||CHR(13)||'12'
-------------------
as
12
SQL>
没问题啊