0

I just want to know that how to make a (NoOfChildrens)tinyint data type to an unsigned tinyint data type through SQL Server Management Studio Express ?

Where 'NoOfChildrens' is a column in table named Family in the database.

Edited by Nitin Daphale: n/a

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Ketsuekiame
0

tinyint is already unsigned. It is a just a single byte of value 0-255.

A point to remember if you ever need to translate to MySQL is that MySQL stores tinyint as SIGNED by default, whereas MS SQL stores it as UNSIGNED by default.

You can cast between the two in code (providing you do sufficient checks first)

-1

tinyint is already unsigned. It is a just a single byte of value 0-255.

Thanks you have solved my problem.
But in future if I want signed tiny int then
how I can make them signed ?

0

Use keyword "smallint"

SQL Server does not have signed tinyint, unsigned smallint, or unsigned int data types. To prevent the loss of data values when migrating these data types, create the SQL Server table with the next largest integer data type.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.