简体   繁体   中英

Regular expressions in SQL?

I want to use a regular expression in Oracle 11g SQL to find records that do not match it. The regular expression is:

/([A-Z]{3})+([0-9])\w+/g

The SQL I want to use would be something like:

select
  stu_code
  ,stu_insc
from
  intuit.ins_stu
where
  stu_insc not like ('/([A-Z]{3})+([0-9])\w+/g')

Obviously I know the above is not right, so does anyone know how I do this? I do not have the rights to run any PL/SQL.

On oracle you can try something along the lines of

select xyz
from theTable
where not regexp_like(mycolumn,pattern)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM