What I tried:
create table name
(id bigserial not null primary key, cash money not null default 0.0);
Why does this code refuse to work? how to correct?
What I tried:
create table name
(id bigserial not null primary key, cash money not null default 0.0);
Why does this code refuse to work? how to correct?
Reading the documentation generally helps: Monetary types
Input is accepted in a variety of formats, including integer and floating-point literals, as well as typical currency formatting, such as '$1,000.00'. Output is generally in the latter form but depends on the locale. Non-quoted numeric values can be converted to money by casting the numeric value to text and then money, for example:
SELECT 1234::text::money;