关于&的用法 &的用法 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Oracle把这里参数连接符&当成是一个自定义变量了。这样写就可以了 select sal into v_sal from emp where ename = chr(38) || 'abc';或者 select sal into v_sal from emp where ename = '&' || 'abc'; 我试过了此方法根本不对&表示控制台输入 这个问题好像很简单的样子,你没加单引号 &abc 表示接收数字的 加上单引号 ‘&abc’ 表示字符! 你试试! declare v_sal emp.sal%type; begin select sal into v_sal from emp where ename='&abc'; dbms_output.put_line(v_sal); end;验证了加上单引号是正确的! 急 请教 oracle 分组 查询 关于字符集问题!高手进来看看。 如何将html表格快速导入数据库,几百万条数据,且分散在几千个文件中? 數據苦連接問題 如何插入日期型数据? 有关于oracle排序的请教 这样的结果如何用一个sql语句显示出来?求救了!!! 求一sql语句 求一条Insert语句! 怎样用SQL语句创建一个本地的服务名? 只有归档的情况下能否进行完成恢复 orcl数据库中的number类型
这样写就可以了
select sal into v_sal from emp where ename = chr(38) || 'abc';
或者
select sal into v_sal from emp where ename = '&' || 'abc';
我试过了此方法根本不对
&表示控制台输入
declare
v_sal emp.sal%type;
begin
select sal into v_sal from emp where ename='&abc';
dbms_output.put_line(v_sal);
end;验证了加上单引号是正确的!