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 6 Years Ago by Nitin Daphale: n/a

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)

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 ?

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.