指导我了解SQL查询中使用的逻辑
SELECT
CASE
WHEN REGEXP_SUBSTR(purchaser_id, '[a-z]') IS NOT NULL
THEN NULL
ELSE purchaser_id
END AS s_purchaser_id
FROM
table1;
这是否意味着如果有任何α数值,它将替换为null?
谢谢!
SELECT
CASE
WHEN REGEXP_SUBSTR(purchaser_id, '[a-z]') IS NOT NULL
THEN NULL
ELSE purchaser_id
END AS s_purchaser_id
FROM
table1;
Does this mean if there is any alpha-numeric value it will replace to NULL?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
逻辑说,如果
pardaser_id
包含一个小写字母,则s_purchaser_id
输出将为null
,否则输出将是相同的<代码> photaser_id 。一些样本:
The logic says that if a
purchaser_id
contain a lowercase letter, thes_purchaser_id
output will beNULL
, otherwise the output will be just be the samepurchaser_id
.Some samples: