# INT or BIGINT - Which Data type we can use [Answered]RSS

## 3 replies

Last post Jan 28, 2015 10:00 AM by PatriceSc

None

0 Points

44 Posts

### INT or BIGINT - Which Data type we can use

Hi Friends,

Just clarification needs.

Which Data Type we can prefer INT or BIGINT.

Pl suggest.

All-Star

35169 Points

9081 Posts

### Re: INT or BIGINT - Which Data type we can use

If you do not know what is BIGINT then most probably you need to use INT.

 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

Star

8536 Points

1376 Posts

Microsoft

### Re: INT or BIGINT - Which Data type we can use

Jan 28, 2015 01:04 AM|Edwin Guru Singh|LINK

#### lathasekar

Just clarification needs.
Which Data Type we can prefer INT or BIGINT.

As per your case, the size is the matter of difference between those datatype .
For your reference, the following int details in sqlserver :

1. tinyint --> 1 byte,--> 0 to 255

2. smallint--> 2 bytes,--> 2^15 (-32,768) to 2^15-1 (32,767)

3. int --> 4 bytes,-->  -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)

4. bigint --> 8 bytes,--> -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)
--
with regards,
Edwin

with regards,
Edwin

All-Star

37350 Points

11418 Posts