首頁>Club>
10
回覆列表
  • 1 # 掉眼淚的冠軍

    RTRIM(<c1>,<c2> ) takes two arguments, where c1 and c2 are characterstrings. This function returns c1 without any trailing characters that appearin c2. If no c2 characters are trailing characters in c1, then c1 is returnedunchanged. c2 defaults to a single space.大家對Rtrim捨去字串右邊的空字串是毫無疑議的有疑問的應該是右邊是字串如何處理的。如:SELECT RTRIM("Mississippi","ip") test1,RTRIM("Rpadded ") test2 ,RTRIM("Mississippi","sip") test3 FROM dual;結果為:test1 test3 test3Mississ Rpadded Mtest1的實現首先從字串"Mississippi"右邊查詢"ip"中的任意字元,此例為"i","p",直到"Mississippi"右邊不為"i"和"p"字元為止,所以結果應該是Mississtest2的實現去掉字串的空格test3的實現實現方法同test1首先從字串"Mississippi"右邊查詢"sip"中的任意字元,此例為"s","i","p",直到"Mississippi"右邊不為"s"、"i"和"p"字元為止,所以結果應該是M可以透過下例進一步瞭解Rtrim函式SELECT RTRIM("Mississippi","Misp") test1,RTRIM("Mississippi","i") test2 FROM dual;test1 test2Mississipp

  • 中秋節和大豐收的關聯?
  • 開車十幾個小時回婆婆家,晚上八點多到結果只有一條沒有洗的魚,婆婆說喜歡吃我做的魚?