Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 스프링 시큐리티
- 관계형 데이터베이스
- 자바
- 유효성검사
- 모던 자바스크립트 Deep Dive
- msa
- java
- 자바 ORM 표준 JPA 프로그래밍
- Thymeleaf
- 공백검사
- JPA
- 출처 모던 자바스크립트 Deep Dive
- 게시판 작성자를 아이디로
- spring security
- 중복되지 않는 값 만들기
- 자바스크립트
- ORM
- UUID
Archives
- Today
- Total
인지용
Cannot truncate a table referenced in a foreign key constraint 에러 Mysql 본문
에러 해결
Cannot truncate a table referenced in a foreign key constraint 에러 Mysql
인지용 2021. 11. 7. 18:14외래키가 존재하는 테이블 삭제방법
> set FOREIGN_KEY_CHECKS = 0;
Query OK, 0 rows affected (0.000 sec)
> truncate 테이블명;
Query OK, 0 rows affected (0.351 sec)
> set FOREIGN_KEY_CHECKS = 1;
Query OK, 0 rows affected (0.000 sec)
출처
https://devpouch.tistory.com/111
[mysql] foreign key가 존재하는 table을 truncate/delete할때 constraint 에러 문제 해결하기
문제상황 truncate 테이블명; ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key constraint (`DB명`.`참조하는 테이블`, CONSTRAINT `test` FOREIGN KEY (`외래키`) REFERENCES `DB명`.`..
devpouch.tistory.com
'에러 해결' 카테고리의 다른 글
Mysql 프로시저 만들때 to your MySQL server version for the right syntax to use near 에러 (0) | 2021.11.10 |
---|---|
Querydsl Error:java: Attempt to recreate a file for type 에러 (0) | 2021.11.08 |
Error:java: java.lang.NoClassDefFoundError: javax/annotation/Generated 에러해결 (0) | 2021.11.04 |
sql 이모티콘 입력시 오류날때 (0) | 2021.10.09 |
스프링부트 404에러 해결방법 (0) | 2021.10.04 |