要求如下:
表A中存在一个字段B,(varchar2型,12位,纯数字)
我想选出字段B中,以33开头,以000结束,同时6到9位不是000的行
该怎么写?
select a.b from a where a.b like '33%' and (???)oracle数据库。
各位大大请教了。
表A中存在一个字段B,(varchar2型,12位,纯数字)
我想选出字段B中,以33开头,以000结束,同时6到9位不是000的行
该怎么写?
select a.b from a where a.b like '33%' and (???)oracle数据库。
各位大大请教了。
select B from A where substr(B,6,3)!='000' and B like '33%000'select a.b from a where a.b like '33%000' and a.b not like '33%000000'
———————————————————————————————————
select a.b from a where a.b like '33%000' and a.b not like '33%000000'
__________________________________________________________________
这个可以!
3Q