问题产生原因:
insert into t_Cluster_Showresult(Outhostname,Domainlist,Iplist,Classify) values ("2014512-7","www.renren.com\twww.baidu.com","192.168.2.1","2")
此条语句执行不成功,报错列不允许,经查,是因为双引号的问题,改成insert into t_Cluster_Showresult(Outhostname,Domainlist,Iplist,Classify) values (‘2014512-7‘,‘www.renren.com\twww.baidu.com‘,‘192.168.2.1‘,‘2012‘) 即可。
sys@EMREP> create table test(a varchar2(10), a
varchar2(10));
create table test(a varchar2(10), a
varchar2(10))
*
ERROR at line 1:
ORA-00957: duplicate column
name
sys@EMREP> create table test("a" varchar2(10), a
varchar2(10));
Table created.
sys@EMREP> SELECT table_name,
column_name FROM user_tab_cols WHERE table_name =
‘TEST‘;
TABLE_NAME
COLUMN_NAME
------------------------------
------------------------------
TEST
a
TEST
A
sys@EMREP>
insert into test values (‘1‘,‘1‘);
1 row created.
sys@EMREP>
commit;
Commit complete.
sys@EMREP> select * from
test;
a A
----------
----------
1
1
以大写方式存在数据字典中,验证一下:
sys@EMREP> create table test_xxxx(a
varchar2(1), "A" varchar2(1));
create table test_xxxx(a varchar2(1), "A"
varchar2(1))
*
ERROR at line 1:
ORA-00957: duplicate
column name
sys@EMREP> select to_char(sysdate,
‘hh24"小时"mi"分"ss"秒"‘) AS RESULT from
dual;
RESULT
------------------
17小时31分30秒
sys@EMREP> select ‘hh24"小时""mi"分"""ss"秒"‘ AS
RESULT from
dual;
RESULT
-----------------------------
hh24"小时""mi"分"""ss"秒"
select ‘alter system kill session ‘‘‘‘||
sid||‘,‘||serial#|| ‘‘‘‘;‘ from v$session
Oracle 中单引号和双引号的区别,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/tina-smile/p/3724727.html