oracle | sqlserver |
---|---|
lengthb | datalength |
length | LEN |
to_number | cast(value as int) |
mod | % |
instr(a,b) | CHARINDEX(b,a) |
substr(A,1,3) | LEFT(A,3) |
substr(a,-3) | right(a,3) |
substr | substring |
timestamp(6) | datetime2(6) |
– | – |
XMLAGG/litsagg | STRING_AGG(CONVERT(NVARCHAR(MAX),值),‘,’) |
DELETE FROM TABLE T | DELETE T FROM TABLE T |
– | – |
select ‘223’+null from dual | select ‘223’+isnull(null,‘’) |
select (sysdate-date)243600 from dual | select datediff(ss,date,getdate()) |
– | – |
sysdate | getdate() |
– | – |
to_char(sysdate,‘yyyymmdd’) | CONVERT(VARCHAR(8),getdate(),112) |
to_char(sysdate,‘yyyymmddhh24:mi:ss’) | replace(replace(replace(CONVERT(varchar, getdate(), 120 ),‘-’,‘’),’ ‘,’‘),’:‘,’') |
– | – |
select count(1) from (select 1 from dual ) | with xx as (select 1 from dual ) select count(1) from xx |
KYCDATA.SEQ_ECID.NEXTVAL | select next value for KYCDATA.SEQ_ECID |
– | – |
函数中exception when others then | @@error!=0 |
sp中 exception when others then | begin try end try begin catch end catch |
– | – |
sys_guid() | replace(newid(),‘-’,‘’) |
nvl(‘’,‘1’)=‘1’ | isnull(null,‘1’)=‘1’ isnull(‘’,‘1’)=‘’ null作为一个对象 |
– | – |
SUBSTR(‘1:2:3:423’, INSTR(‘1:2:3:423’, ‘:’, -1) + 1) | reverse(substring(reverse(‘1:2:3:423’),1,charindex(‘:’,reverse(‘1:2:3:423’))-1)) |
CHR(9) 换行符 CHR(13) 回车符 | CHAR(9) CHAR(13) |
bclob | IMAGE |
CLOB | TEXT |
month_between(date1, date2) | datediff(mm,date1,date2) |
拆分逗号https://blog.csdn.net/u012949335/article/details/118852731 |
04-14
185
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交