-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi!
I don't know if his is RDBMS-dependent, but on MS SQL Server, the default decimal data type is decimal(18,0), which means 18 digit integers, essentially, nothing after the decimal point, so this script run as-is will truncate all the values in the Price column of the Products table to integers (despite maintaining the decimal type). The solution is simple, the table has to be created with something like a decimal(10,3) type, or float.
By the way, a similar issue could present itself with the varchar fields depending on the collation used, usually it's safer to use nvarchar.
Also, re: the whole reason this repo exists: I believe AndrejPHP's script runs only on MySQL, I don't think it's outdated or broken. But thanks for making a SQL Server compatible version anyway.