如何转义&
SELECT   *         FROM   A   where   A.col1   =    'F&ORG '   
 用shell调sqlplus,要查的是col1值为 'F&ORG ',但是总是提示输入变量&org 
------解决方案--------------------SQL>  insert into test000 values( 'scott '||chr(38)|| 'tiger ');   
 1 row inserted   
 SQL>  commit;   
 Commit complete   
 SQL>  select * from test000;   
 username 
 ---------------------------------------- 
 scott&tiger
------解决方案--------------------SELECT *   FROM A where A.col1 =  'F ' || chr(38) || 'ORG '
------解决方案--------------------where A.col1 = 'F '|| '& '|| 'ORG '   
 这样行不
------解决方案--------------------CREATE TABLE t_01(col1 VARCHAR2(20)) 
 INSERT INTO t_01 VALUES ( 'F '|| '& '|| 'ORG ') 
 SELECT * FROM t_01 
 SELECT * FROM t_01 WHERE col1= 'F '|| '& '|| 'ORG '   
 我这里这样倒是可以的
------解决方案--------------------zt   
 回复: 请教:SQL语句中转义符是那个?     
 我知道了,在sql*plus中使用转义符 '\ ',要首先修改环境变量  
 set escape on  
 随后就可以使用转义符 '\ '了,例如  
 SQL> set escape on  
 SQL> select count(*) from employees where name= '\[$1 ']  
    COUNT(*)  
 ----------  
           0  
 SQL> select count(*) from employees where name= '&1 ';      
 输入 1 的值:  a      
 原值    1: select count(*) from employees where name= '&1 '  
 新值    1: select count(*) from employees where name= 'a '      
   COUNT(*)  
 ---------  
          0