박노철
maceo.park@gmail.com
http://merritt.co.kr

다음과 같은 테이블을 생각해보자.

create table #test_tbl
(
   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.


테이블 만들어질때뿐 아니라. alter table add 로 컬럼 추가할 때도 저런 컬럼을
추가할 수 있다. DB의 버그일까, 원래 RDB의 사상에 맞도록 만들어진 것일까?
알 수 없는 노릇이다. 쩝.


Posted by maceo

03 19, 2006 03:06 03 19, 2006 03:06
, ,
Response
3 Trackbacks , No Comment
RSS :
http://merritt.co.kr/tt/rss/response/37


블로그 이미지

가늘어도 긴놈이 장땡

- maceo

Archives

Authors

  1. maceo

Calendar

«   9 2010   »
      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    

Site Stats

Total hits:
179884
Today:
3
Yesterday:
35