两种情况:
下面是针对上面两种情况的尝试:
T5240.com%
T5240.com% sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.5.0 - Production on 星期二 3月 5 12:21:58 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
会话已更改。
SQL>
SQL> create table zzw_temp (name varchar2(20));
表已创建。
SQL> insert into zzw_temp(name) values('zzw');
已创建 1 行。
SQL> commit;
提交完成。
SQL> select * from zzw_temp;
NAME
--------------------
zzw
SQL> insert into zzw_temp(name) values('&');
已创建 1 行。
SQL> commit;
提交完成。
SQL> select * from zzw_temp;
NAME
--------------------
zzw
&
SQL>
SQL>
SQL>
SQL>
SQL> insert into zzw_temp(name) values('https://192.168.0.1/index.html&http');
输入 http 的值: 123
原值 1: insert into zzw_temp(name) values('https://192.168.0.1/index.html&http')
新值 1: insert into zzw_temp(name) values('https://192.168.0.1/index.html123')
insert into zzw_temp(name) values('https://192.168.0.1/index.html123')
*
第 1 行出现错误:
ORA-12899: 列 "SYS"."ZZW_TEMP"."NAME" 的值太大 (实际值: 35, 最大值: 20)
SQL> alter table zzw_temp modify name varchar2(200);
表已更改。
SQL> insert into zzw_temp(name) values('https://192.168.0.1/index.html&http');
输入 http 的值: 123
原值 1: insert into zzw_temp(name) values('https://192.168.0.1/index.html&http')
新值 1: insert into zzw_temp(name) values('https://192.168.0.1/index.html123')
已创建 1 行。
SQL> select * from zzw_temp;
NAME
----------------------------------------------------------------------------------------------------------------------------------
zzw
&
https://192.168.0.1/index.html123
SQL> insert into zzw_temp(name) values('https://192.168.0.1/index.html'||'&'||'http');
已创建 1 行。
SQL> commit;
提交完成。
SQL> select * from zzw_temp;
NAME
----------------------------------------------------------------------------------------------------------------------------------
zzw
&
https://192.168.0.1/index.html123
https://192.168.0.1/index.html&http
SQL>
SQL>