日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

oracle sql 正则表达式

發布時間:2023/12/14 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oracle sql 正则表达式 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

備注:
詳細直接看注釋就好
介紹了sql的正則使用

sql:

--9.正則 --REGEXP_LIKE, REGEXP_REPLACE --REGEXP_INSTR, REGEXP_SUBSTR--.匹配任意單個字符 /* select prod_name from products where regexp_like(prod_name, '.000') order by prod_name */--執行or操作 /* select prod_name from products where regexp_like(prod_name, '1000|2000') order by prod_name */--匹配多個字符之一[] /* select prod_name from products where regexp_like(prod_name, '[123] ton') order by prod_name */--^對字符集取反 /* select prod_name from products where regexp_like(prod_name, '[^123] ton') order by prod_name */--‘-'表示范圍 /* select prod_name from products where regexp_like(prod_name, '[1-5] ton') order by prod_name */--轉義匹配特殊字符 /* select vend_name from vendors where regexp_like(vend_name, '\.') order by vend_name */--匹配字符類別 -- \d任意數字,\D任意非數字,\w任意字母or數字 -- \W任意非字母或數字[^a-zA-Z0-9],\s任意空白,\S任意非空白-- 重復元字符 -- *:0或多 -- +: 1或多 -- ?: 0或1 -- {n}:具體多次 -- {n,}: 大于等于n次 -- {n,m}: 范圍搜索--?的對象是s /* select prod_name from products where regexp_like(prod_name, '\(\d sticks?\)') order by prod_name */-- \d{4}表示匹配四個 /* select prod_name from products where regexp_like(prod_name, '\d{4}') order by prod_name */--錨 -- ^文本的開頭 -- $文本的結尾select prod_name from products where regexp_like(prod_name, '^[0-9\.]') order by prod_name--regexp_like + ^ + $ = like

總結

以上是生活随笔為你收集整理的oracle sql 正则表达式的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。