MONEY Data Type - SQL Server to MariaDB Migration

In SQL Server, the MONEY data type stores 64-bit monetary values, decimal numbers with up to 4 digits after the decimal point.

In MariaDB, you can use the DECIMAL(19,4) data type.

SQL Server:

  -- Sample table 
  CREATE TABLE products
  (
    name VARCHAR(30),
    price MONEY
  );
 
  -- Sample data
  INSERT INTO products VALUES ('Apple', 19.95);

MariaDB:

  -- Sample table 
  CREATE TABLE products
  (
    name VARCHAR(30),
    price DECIMAL(19,4)
  );
 
  -- Sample data
  INSERT INTO products VALUES ('Apple', 19.95);

For more information, see SQL Server to MariaDB Migration.