■■高分请教一个SQL语句:ORACLE数据库,请看叙述■■ select * from SECRITY where ','||DEPLIST||',' like '%,0101,%' 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from SECRITY where DEPLIST like '0101%';select * from SECRITY where substr(DEPLIST,1,4) = '0101'; select * from SECRITY where DEPLIST = '0101'不就行了有点清楚你的意思 是不是有空格啊,,,去掉空格看看,ltrim(rtrim(DEPLIST)) 对不起,看错你的意思了,还是按照onejune4450(中文字符)的写法吧。 select * from SECRITY where DEPLIST like '0101%'这样应该可以的! select * from SECRITY where instr(DEPLIST,'0101')>0; select * from SECRITY where DEPLIST like '%,0101' or deplist like '0101,%'or deplist like '%,0101,%'; select * from SECRITY where DEPLIST like '0101%'; select * from SECRITY where DEPLIST like '%0101%' 应该解决了吧, 这么多思路。不过,我觉得你的数据库当中应该有一个部门的表,以保持数据的完整性。是吧!到时候查询就更容易了select * from table1 where table1.id in (select table2.id from table2) oracle 排序 急!!如何设置oracle,使用户登录的时候不需要输入用户名密码 ORACLE ora-01031问题请教 想学pro*c 谁能给我讲讲从编写源码到编译再到执行的整个过程? 装oracle死机了? 急急。。。请高手进~~~~~~~~一个头疼的问题!!!!!!!!!!!熟系流程软件生成字段的进!!!!!!!! 启动的问题 简单问题 olivertree(自古多情空余恨),beckhambobo(beckham), akinggom(kinggom,onejune4450(中文字符) 进来接分~! 是高手的就进来吧 关于分析函数的 如何在oracle中建立自动加一字段?
select * from SECRITY where substr(DEPLIST,1,4) = '0101';
有点清楚你的意思
DEPLIST like '%,0101'
or deplist like '0101,%'
or deplist like '%,0101,%';
不过,我觉得你的数据库当中应该有一个部门的表,以保持数据的完整性。是吧!
到时候查询就更容易了
select * from table1 where table1.id in (select table2.id from table2)