Solved

Bigint As Unsigned Value? (MS SQL Server)

Posted on 2009-05-10
2
1,968 Views
Last Modified: 2012-05-06
If I want to store an unsigned value how do I go about it?

In mysql it can be done, but in ms sql, how?
0
Comment
Question by:robertkc
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 24349314
you put a bigint, and set a check contraint to allow only values >= 0 .
see here:
http://www.julian-kuiters.id.au/article.php/sqlserver2005-unsigned-integer
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24351266
there is no default data type to do it in SQL Server, can you please let us know your goal, we may show you some other way of doing it? Otherwise the solution above is fine, create user defined data type and put a check constraint
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how the fundamental information of how to create a table.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now