数据库查询(mysql、oracle)
我在这个项目上遇到了一些麻烦。 我有一个由mysql编写的查询语句。 我需要把它从mysql改成oracle。 查询如下:数据库查询(mysql、oracle),mysql,database,oracle,Mysql,Database,Oracle,我在这个项目上遇到了一些麻烦。 我有一个由mysql编写的查询语句。 我需要把它从mysql改成oracle。 查询如下: select substring(ad_cde,1,18) from advertise where substring(ad_cde,1,18)='119821168010300222' insert into advertise(ad_cde) select concat('119821168010300000',lpad(convert(substring(max
select substring(ad_cde,1,18)
from advertise
where substring(ad_cde,1,18)='119821168010300222'
insert into advertise(ad_cde)
select concat('119821168010300000',lpad(convert(substring(max(ad_cde),19,3),unsigned)+1,3,'0')) as a
from advertise
where substring(ad_cde,1,18)='119821168010300000'
and EXISTS(select * from advertise where substring(ad_cde,1,18)='119821168010300000')
insert into advertise(ad_cde)
select concat('119821168010300101',lpad(convert(substring(max(ad_cde),19,3),unsigned)+1,3,'0')) as a
from advertise
where NOT EXISTS(select * from advertise where substring(ad_cde,1,18)='119821168010300101')
因为有人在取笑我,所以它真的很匆忙。用“plsql”函数替换“mysql”函数 带substr的子字符串 在要连接的内容之间使用| |进行连接 如果convert要将类型更改为number,则将其替换为to_number