Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2150
  • Last Modified:

Bigint As Unsigned Value? (MS SQL Server)

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
robertkc
Asked:
robertkc
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
RiteshShahCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now