Home Dashboard Directory Help
Search

Unsigned numeric datatypes containing only positive values by Manoj Pandey (manub22)


Status: 

Active


1
0
Sign in
to vote
Type: Suggestion
ID: 811859
Opened: 12/17/2013 8:18:05 PM
Access Restriction: Public
0
Workaround(s)
view

Description

While creating Surrogate or Primary Keys by using INT or BIGINT datatypes most of the time I wonder if they I will reach their max limit in near future then what would I do? Due to this many a times I or many other developers tend to use BIGINT or GUIDs instead of INT.

I would recommend to have a UNSIGNED prefix before INT & BIGINT datatypes, so that they will contain only positive values. Thus doubling up the positive values that can contain now.

Thanks,
Manoj Pandey
http://sqlwithmanoj.wordpress.com
Details
Sign in to post a comment.
Sign in to post a workaround.