CREATE TABLE foo ( bar INT(20) ZEROFILL );

mysql 에서 칼럼 선언에 INT(20), BIGINT(20) 같이 type 뒤에 숫자가 있길래 varchar(20) 와 같이 사이즈 의미인가 싶었다. 하지만 검색해보니 값의 범위에는 영향을 주지 않고 표시할 때 너비 힌트 정도로 사용된다고 한다. :(

https://stackoverflow.com/questions/3135804/types-in-mysql-bigint20-vs-int20

 

Types in MySQL: BigInt(20) vs Int(20)

I was wondering what the difference between BigInt, MediumInt, and Int are... it would seem obvious that they would allow for larger numbers; however, I can make an Int(20) or a BigInt(20) and that...

stackoverflow.com

 

728x90

+ Recent posts