column type : int unsigned
select GREATEST(cast(column_name as signed) + (- 1), 0) from table_name;
check this link: mysql GREATEST
개인 일상, 내가 까먹어서 적는 개발 노트, 각종 리스트들
column type : int unsigned
select GREATEST(cast(column_name as signed) + (- 1), 0) from table_name;
check this link: mysql GREATEST