SQL is a widely-used programming language for computer databases in business. Frequently, software developers need to combine different kinds of data, such as integer and character fields, into a ...
The SQL specification only defines SMALLINT and INT with implementation defined precision. The only constraint is that both have precision, that precision is of the same type, and SMALLINT <= INT.
3 divided by 2.0 returns 1.5 in SQL Server. This is because 2.0 includes a decimal point and therefore SQL Server treats it as a DECIMAL data type. The resulting value also has a DECIMAL data type.