mysql 질문드립니다.
본문
test 테이블이라고 치고..
필드명 gu_code에 값이 없는애들만 찾아서 "-" 를넣어주고싶은데
타입이 varchar이거든요.. 어떻게 select해야할까요ㅠㅠ
답변 2
select * from test where gu_code = '' or gu_code is null
이렇게 해서 빈값이 조회되는걸 확인하신후
update test set gu_code = '-' where gu_code = '' or gu_code is null
이렇게 하시면 될거 같습니다.
update test set gu_code = '-' where gu_code = '' or gu_code is null
답변을 작성하시기 전에 로그인 해주세요.