maceo.park@gmail.com
http://merritt.co.kr
다음과 같은 테이블을 생각해보자.
create table #test_tbl
(
col1 tinyint default 600
)
(
col1 tinyint default 600
)
600이면 tinyint 의 범위를 벗어난다. 이런 테이블을 만들 수 있을까......???
...
테스트해봐라. 된다 -_-;;;;; 2000, 2005 모두 다 된다.
그럼 진짜로 값이 뭔가 들어갈까???
insert into #test_tbl default values
이건 에러를 낸다.
Msg 220, Level 16, State 2, Line 1
Arithmetic overflow error for data type tinyint, value = 600.
The statement has been terminated.
Arithmetic overflow error for data type tinyint, value = 600.
The statement has been terminated.
테이블 만들어질때뿐 아니라. alter table add 로 컬럼 추가할 때도 저런 컬럼을
추가할 수 있다. DB의 버그일까, 원래 RDB의 사상에 맞도록 만들어진 것일까?
알 수 없는 노릇이다. 쩝.
Posted by maceo

