Oracle 中包含特定字元的函數
在 Oracle 資料庫中,您可以使用 INSTR() 函數檢查某字串中是否包含特定字元。
語法:
<code>INSTR(string, substring)</code>
其中:
#string:要搜尋的字串substring:要尋找的字元或字串範例:
尋找字串"Hello World" 中是否包含字母"o":
<code>SELECT INSTR('Hello World', 'o') FROM dual;</code>結果:
<code>4</code>
這表示字元"o" 位於字串"Hello World" 中的第4 個位置。
返回結果:
substring 在string 中找到,則傳回substring 在string 中的第一個出現位置。 substring 不在 string 中找到,則傳回 0。 注意事項:
substring 為空字串,則 INSTR() 函數傳回 1。 以上是oracle包含某個字元用什麼函數的詳細內容。更多資訊請關注PHP中文網其他相關文章!