posted 21 years ago
When we cast a data type with a lesser size to a bigger one, explicit cast is required. The reason is that when we convert a bigger date type to a smaller one (Byte Size), the bytes will be eliminated to meet the size if the smaller data type and the value won't be correct.
If u cast a smaller data type to bigger datatype, say an short to integer, the conversion will be automatic as the bytes will fit in and there won't be any change in the values.
And if the values are within the range, there is no need for explicit cast.