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;
HKH
2017-04-20 12:56
SHARE
keyboard_arrow_left
keyboard_arrow_up