SQL

[SQL 오류] integer display width is deprecated and will be removed in a future release

dev22 2023. 3. 3. 20:06
728x90

교재(SQL 쿡북)를 보고 테이블을 생성하려다 보니 다른 DB 문법이라 그런지 number를 단순히 int로 변경하였는데 경고가 발생하였습니다.

integer display width is deprecated and will be removed in a future release
정수 표시 너비는 더 이상 사용되지 않으며 향후 릴리스에서 제거됩니다.

https://studyingpingu.tistory.com/51?category=1014546 

 

[MySQL] 워닝 문구 상세 내용 확인하는 법 (feat. Warning 1681)

Warning | 1681 | Integer display width is deprecated and will be removed in a future release. 예제를 따라서 SQL문을 작성하다가 마주친 워닝 문구 아마 범위 지정때문에 경고를 받은듯하다 어떤 경고인지 자세하게 보

studyingpingu.tistory.com

 

https://dev.mysql.com/doc/refman/8.0/en/numeric-type-attributes.html

 

MySQL :: MySQL 8.0 Reference Manual :: 11.1.6 Numeric Type Attributes

11.1.6 Numeric Type Attributes MySQL supports an extension for optionally specifying the display width of integer data types in parentheses following the base keyword for the type. For example, INT(4) specifies an INT with a display width of four digits.

dev.mysql.com

이러한 워닝은 데이터를 저장하거나 표출하는데 아무런 문제가 없으며

 

그렇더라도 이러한 문구를 피하고싶다면, 기존 컬럼 타입을

INT(11) 등의 형태에서 INT로 수정하라고 해결방법까지 안내해준다