SELECT $ (dollar sign)

After a little messing around, I've figured since this happens no matter what currency symbol is used, SQL server is implying that the field is a currency field.

If you add numbers after the currency symbol, in this case a dollar so:

SELECT $4

SQL server will return 4.00

So SQL Server is taking the use of $ and assuming we want to create a field with the MONEY datatype and as we haven't entered a value after the currency symbol, SQL Server assumes the value is 0, though in my opinion this should return NULL.


When SQL Server comes across your $ sign, it automatically converts it into a money data type. Because you don't have an explicit value after the dollar sign, SQL Server is assuming 0.00. From MSDN:

When converting to money or smallmoney, integers are assumed to be monetary units. For example, the integer value of 4 is converted to the money equivalent of 4 dollars (for us_english, the default language). Numbers to the right of the decimal in floating-point values are rounded to four decimal places for money values. Expressions of data types char or varchar that are being converted to an integer data type must consist only of digits and an optional plus or minus sign (+ or -). Leading blanks are ignored. Expressions of data types char or varchar converted to money can also include an optional decimal point and leading dollar sign ($).