例子: select count(case ltrimrtrim((type)) when '1' then 1 else 0 end ) , count(case ltrimrtrim((type)) when '2' then 1 else 0 end ) , sum(case ltrimrtrim((type)) when '1' then cost else 0 end ) , sum(case ltrimrtrim((type)) when '2' then cost else 0 end ) from RECEIPT_TABLE
还是不很明白,汗ing~ 可否说明一下~怎么 select count(case ltrimrtrim((type)) when '1' then 1 else 0 end ) , count(case ltrimrtrim((type)) when '2' then 1 else 0 end ) , sum(case ltrimrtrim((type)) when '1' then cost else 0 end ) , sum(case ltrimrtrim((type)) when '2' then cost else 0 end ) from RECEIPT_TABLE 都没见到 decode 这个函数
select count(case ltrim(rtrim(type)) when '1' then 1 else 0 end ) , count(case ltrim(rtrim(type)) when '2' then 1 else 0 end ) , sum(case ltrim(rtrim(type)) when '1' then cost else 0 end ) , sum(case ltrim(rtrim(type)) when '2' then cost else 0 end ) from RECEIPT_TABLE
select count(case ltrimrtrim((type)) when '1' then 1 else 0 end ) ,
count(case ltrimrtrim((type)) when '2' then 1 else 0 end ) ,
sum(case ltrimrtrim((type)) when '1' then cost else 0 end ) ,
sum(case ltrimrtrim((type)) when '2' then cost else 0 end )
from RECEIPT_TABLE
可否说明一下~怎么
select count(case ltrimrtrim((type)) when '1' then 1 else 0 end ) ,
count(case ltrimrtrim((type)) when '2' then 1 else 0 end ) ,
sum(case ltrimrtrim((type)) when '1' then cost else 0 end ) ,
sum(case ltrimrtrim((type)) when '2' then cost else 0 end )
from RECEIPT_TABLE 都没见到 decode 这个函数
count(case ltrim(rtrim(type)) when '2' then 1 else 0 end ) ,
sum(case ltrim(rtrim(type)) when '1' then cost else 0 end ) ,
sum(case ltrim(rtrim(type)) when '2' then cost else 0 end )
from RECEIPT_TABLE
使用 pass_str 做为密钥加密 str。使用 DECODE() 解密结果。结果是一个与 string 一样长的二进制字符。如果希望将它保存到一个列中,请使用 BLOB 列类型。 DECODE(crypt_str,pass_str)
使用 pass_str 作为密钥解密加密后的字符串 crypt_str。crypt_str 应该是一个由 ENCODE() 返回的字符串。 这样的语法,可否举例稍稍说明一下哇,谢谢~~~~