字段名问题
SQL Server中,可以用select [字段名] from 表名的形式处理字段名中有特殊字符问题,请问Oracle中,有没有对应于[]字符的关键字呢?字段名中有特别字符
------解决方案--------------------可以通过很多种方式,以下给个实例,比如需要向表中某字段插入&开头的字符:
SQL> conn test/test
Connected.
SQL> create table t2(id1 varchar2(32),name varchar2(32));
Table created.
SQL> insert into t2(id1,name) values('a','1');
1 row created.
SQL> insert into t2(id1,name) values('&a','2');
Enter value for a:
old 1: insert into t2(id1,name) values('&a','2')
new 1: insert into t2(id1,name) values('','2')
1 row created.
SQL> insert into t2(id1,name) values('&'||'a','3');
1 row created.
SQL> select * from t2;
ID1 NAME
-------------------------------- --------------------------------
a 1
2
&a 3
------解决方案--------------------是字段名中还是内容中含有特殊字符啊
SQL code
create table TEST2
([wps] varchar(20));
------解决方案--------------------
SQL code
SELECT '#$%#*()()@#$$%^&' AS TEST FROM DUAL;