oracle 字符串 连接 比较 表1字段a varchar2 20090801-001表2字段b 字段cnumber varchar2 200908 01-001想比较 a=b+c怎么写语句呢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不明白要怎么比较,但是条件可以参考WHERE条件后面:select * from 表1,表2 where 表1.a=表2.b||表2.c 两表中都存在的select *from 表1 inner join 表2 on a=to_char(b)||c表1中有,表2没有select *from 表1 left join 表2 on a=to_char(b)||cwhere 表2.a is null select case when 表1.a = 表2.b||表2.c then 1 else 2 from 表1,表2 where 关联字段相等 鉴于你需要比较的字段可以转换成日期形式,就可以这样来做,从表a中去除字段1,从biao b,表C中取出字段2和字段3,用 || 连接成与字段1相符的形式(字段4),然后将字段1和字段4都转换成日期形式,在orcal中日期形式就可以做比较了。 create table table1( a varchar2(30));insert into table1 select '20090801-001' from dual;create table table2( b number(10,0), c varchar2(30)); insert into table2 select '200908','01-001' from dual;select *from table1 a, table2 bwhere a.a = to_char(b.b)||b.c select 表1.a, 表2.b||表2.c from 表1,表2 ; 比较: a和b+c select 表1.a, 表2.b||表2.c from 表1,表2 ; 2个Oracle 数据之间数据的转换,当转换数据量比较大的时候的效率问题? 求一存储过程,实现两个Oracle数据库(IP不同)之间的数据复制 for 循环 速度极慢 就像死锁.. oracle文字显示问题 要解决这样的一个问题 Oracle 32位 安装在 windows2003 64位 操作系统下,会有问题吗? 菜鸟问问题:关于时间处理 同样的table,为什么我的那么慢 新问题,在oracle8i安装过程中,已经安装默认的数据库,但是安装完成后无scott这一用户? dbms_random.value() 问题 关于Oracle的启动问题... ORA-00376 ORA-01110
select * from 表1,表2 where 表1.a=表2.b||表2.c
select *
from 表1 inner join 表2 on a=to_char(b)||c表1中有,表2没有
select *
from 表1 left join 表2 on a=to_char(b)||c
where 表2.a is null
create table table1
(
a varchar2(30)
);insert into table1 select '20090801-001' from dual;
create table table2
(
b number(10,0),
c varchar2(30)
);
insert into table2 select '200908','01-001' from dual;
select *
from table1 a,
table2 b
where a.a = to_char(b.b)||b.c
select 表1.a, 表2.b||表2.c from 表1,表2 ;