DBMS
[MySQL] 컬럼에 default 값 넣고 싶은데 java.lang.RuntimeException: [42000][1064]you have an error in your sql syntax; check the manual that corresponds to your mysql server version for the right syntax 만날때
Alchemists
2022. 8. 7. 13:23
728x90
컬럼에 default 값 넣고 싶은데 java.lang.RuntimeException: [42000][1064]you have an error in your sql syntax; check the manual that corresponds to your mysql server version for the right syntax 만날때가 있다.
분명 Syntax도 틀리지 않은 것 같으면 Not null 설정을 한번 보자.
null이 될 수 있게 설정을 풀어주면 default 값이 들어갈거다.
만약 Not null 설정을 껐으면 반대로 Not null 설정을 켜보면 default값이 들어갔다!
728x90