Sql Equivalent to UInt16
Asked Answered
D

1

6

I know that the Sql equivalent of Int16 is SqlInt16.

But what is the Sql equivalent of UInt16, UInt32 and Uint64?

Diplomatics answered 17/10, 2009 at 21:19 Comment(0)
U
3

Except for tinyint, there are no native unsigned types in SQL server so there is no good equivalent. The best you can do is use a bigger precision number and add a constraint on the permissible values.

Uteutensil answered 17/10, 2009 at 21:21 Comment(4)
MySQL has the UNSIGNED attribute, if you can use it.Dangerfield
But what would be the case of UInt64? What would be thye bigger precision?Diplomatics
@JMSA, I'm not familiar enough with SQL's data types to provide a good answer to that. Hopefully someone else will chime in with a bigger type that can suite this need.Uteutensil
Assuming SQL Server, for Unit 64: decimal(20,0) with a check constraint between 0 and 18,446,744,073,709,551,615.Filberte

© 2022 - 2024 — McMap. All rights reserved.