Decimal precsion?

Поиск
Список
Период
Сортировка
Искать

Decimal precsion?

От:
"Zot O'Connor" <zot@zotconsulting.com>
Дата:

create table subzone (       subzid        integer,       subzsid       integer DEFAULT NEXTVAL ('subzone_seq'),       subzdescr     varchar,       subztaxper    decimal(0,4),       subzvendid    integer,       subzwhsid     integer,       subztaxship   integer
);
ERROR:  DECIMAL precision 0 must be beween 1 and 1000


Is this documented anywhere?  By the way it should be "beTween."


-- 
Zot O'Connor

www.ZotConsulting.com
www.WhiteKnightHackers.com

Re: [SQL] Decimal precsion?

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> 
> create table subzone (
>         subzid        integer,
>         subzsid       integer DEFAULT NEXTVAL ('subzone_seq'),
>         subzdescr     varchar,
>         subztaxper    decimal(0,4),
>         subzvendid    integer,
>         subzwhsid     integer,
>         subztaxship   integer
> );
> ERROR:  DECIMAL precision 0 must be beween 1 and 1000
> 
> 
> Is this documented anywhere?  By the way it should be "beTween."

Precision is the full length of the field.  Scale is the number of
digits to the right of the decimal point.

Beween -> Between change made.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610) 853-3000 +  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

FAQ