用replace行吗?
解决方案 »
- 关于一个比例的SQL语句,我脑子实在转不过弯了,请帮忙
- 高分求number型字段,怎么设置插入的值不能小于0,如果小于0,默认为0.
- ORACLE的存储过程 判断问题
- Oracle 10g创建存储过程必须先创建包吗?
- (新手)高难度多表查询
- 求一个OC4J的下载地址~
- 使用SQL关键字做表名如何写SQL语句?
- systimestamp与SYSDATE有什么区别?
- 请问你们的Enterprise Manager Console 的界面是不是 ie 形式打开的,我的版本是 10g, 初学者. 觉得这样操作起来很不爽, 又慢
- 菜鸟问题,请问专家(在线等!!!!!)
- 跪求一条查询重复记录的sql语句
- Oracle 分页的存储过程
declare
v_tmp varchar2(2);
begin
select substr('PS',1,1) into v_tmp from dual;
if v_tmp = 'P' then
dbms_output.put_line('开头是P字母');
else
dbms_output.put_line('开头不是P字母');
end id;
end;
或者
select e.ename, e.sal from emp e where lower(substr(e.ename,1,1))=lower('P');这样会查出名字是以P开头的信息.
select decode(substr('pma',1,1),'p','p','不p') c1,
decode(substr('zuoma',1,1),'p','p','不p') c2
from dual c1 c2
-------------------------
1 p 不p