使用REGEXP INSQL/PL无重复数字

发布于 2025-01-22 16:11:25 字数 835 浏览 1 评论 0原文

我有下面的表,需要使用正则表达式显示正确的课程数字(3位数字为最大数字#),并且最大肯定不会出现两次数字。

我创建的以下代码是:

select regexp_substr(course_number,'([0-9][0-9][0-9])\1') as CourseNumber

从课程中 /

这是正确的,向我展示了一个输出:

”在此处输入图像描述”

我如何确保sql/pl中的regexp在不重复数字的情况下查询数字?

我创建的表格外观像这样:

“在此处输入图像描述”

I have a table below and need to use a regular expression to display the correct course digits ( 3 digits being the max # of digits) and also max sure no number appears twice.

enter image description here

the following code I have created is this:

select regexp_substr(course_number,'([0-9][0-9][0-9])\1') as CourseNumber

from courses
/

this is correct showing me an output of this:

enter image description here

How can I sure the regexp in sql/pl to query the digits with no numbers repeating?

the table I created looks like this:

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文