This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我想使用一个使用 REGEXP 的 CASE 语句。目前我正在做这样的事情:
SELECT `date_of_sale`,
CASE
WHEN `date_of_sale` regexp '[0-9]*-[0-9]*-[0-9]*' then str_to_date(`date_of_sale`, '%m-%d-%Y')
ELSE
`date_of_sale`
END
FROM <TABLE_NAME>