Mysql CASE using REGEXP (number)

북마크 추가

select col1,
case
  when col2 regexp '^-?[0-9]+$' then CONCAT('test:',col2)
  when col2 regexp 'regex' then 'example'  
else 
  col2
end 
  as col2
from table;
AD
관리자
2017-04-20 12:56
SHARE