본문 바로가기
프로그래밍/DB & Redis

int, bigint,smallint, and tinyint 사이즈와 범위

by 뽀도 2015. 7. 7.

[출처 : https://msdn.microsoft.com/en-us/library/ms187745.aspx]

int, bigint, smallint, and tinyint (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Exact-number data types that use integer data.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.


Data type

Range

Storage

bigint

-2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)

8 Bytes

int

-2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)

4 Bytes

smallint

-2^15 (-32,768) to 2^15-1 (32,767)

2 Bytes

tinyint

0 to 255

1 Byte


반응형

'프로그래밍 > DB & Redis' 카테고리의 다른 글

MS_SQL 반복문  (0) 2015.07.14
DB 데이터 형식 맵핑  (0) 2015.07.07
[DB] sql SET ANSI_NULLS, SET QUOTED_IDENTIFIER  (0) 2015.07.01
[ms sql] 계정의 암호가 만료되었습니다  (0) 2015.06.09
Insert 쿼리  (0) 2015.06.09

댓글