
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
제가 작성한 코드는 왜 실행이 안되는지 궁금합니다.
select email IF(eamil like '$@$',email,replace(email,'g','@g'))
from customers
이부분에서 email에 '@'를 포함 한 경우 email컬럼을 불러오고 그렇지 않으면, g를 @g로 변경해라 라는 IF문을 작성하였는데 어디가 틀렸는지 모르겠습니다.
SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF(eamil like '$@$',email,replace(email,'g','@g'))
from customers' at line 2
Error position: line: 1
