
test 테이블이라고 치고..
필드명 gu_code에 값이 없는애들만 찾아서 "-" 를넣어주고싶은데
타입이 varchar이거든요.. 어떻게 select해야할까요ㅠㅠ
|
답변 2개
채택된 답변
+20 포인트
8년 전
select * from test where gu_code = '' or gu_code is null
이렇게 해서 빈값이 조회되는걸 확인하신후
update test set gu_code = '-' where gu_code = '' or gu_code is null
이렇게 하시면 될거 같습니다.
그누스트랩
8년 전
update test set gu_code = '-' where gu_code = '' or gu_code is null
답변을 작성하려면 로그인이 필요합니다.