안녕하세요. my sql 에서 데이터에 저장된 계산 식을 실제 계산에 사용 하고 싶습니다.
select *
from (select 3 as one, 4 as two, '*' as three from dual
union all
select 3 as one, 4 as two, '+' as three from dual) a
이렇게 두행이 있다고 하면 첫번째 행은 one 컬럼과 two 컬럼이 three 컬럼에 * 이 값으로 해서 12
두번째 행은 one 컬럼과 two 컬럼이 three 컬럼에 + 이 값으로 해서 7 로 하고 싶습니다.
단순 두개의 수 연산이면 case 문으로 분기 처리하면 될것같네요
case when three = '+' then one + two
when three = '*' tjen one * two
....
폰이리 오타가있네요 tjen =>then