mysql로 공지사항 날짜 수정을 하려고 합니다.


날짜를 2월 4일로 수정하고싶은데 어떤 쿼리를 작성하면 될까요??
Copy
update bo_table
set bf_datetime = '2022-02-04'
where bf_datetime = '2022-02-15 17:40:47';
이렇게 작성했더니 수정 안됐습니다ㅠㅠ...
답변 5개 / 댓글 5개
채택된 답변
+20 포인트
bo_table은 필드명입니다. 필드명 보니까 g5_board_file 테이블이군요.
UPDATE g5_board_file SET bf_datetime='2022-02-04 00:00:00' WHERE bo_table='notice' AND wr_id=32
그리고, 공지 사항의 글 쓴 시간 변경은 아래처럼….
UPDATE g5_write_notice SET wr_datetime='2022-02-04 00:00:00' WHERE wr_id=32
Copy
use gccsc;
SELECT * FROM gccsc.g5_board_file
where bo_table="notice" and wr_id="32";
update bo_table
set bf_datetime = "2022-02-04"
where wr_id = "32";
SELECT * FROM gccsc.g5_board_file
where bo_table="notice" and wr_id="32";
이렇게 했더니
error code: 1146. Table'bccsc.bo_table'doesnt exist라고 뜹니다...ㅠㅠㅠ...
sql 초보 살려주세요..
답변에 대한 댓글 2개
답변을 작성하려면 로그인이 필요합니다.