Jump to content

Типове числени полета във Firebird


Препоръчан пост

По какво се различават числените полета във Firebird ?

Искам да сложа полета за таблица за стоки:

ID избирам INTEGER, макар че мога да избера BIGINT или SMALLINT;

NAME избирам VARCHAR

PRICE се колебая между FLOAT, DOUBLEPRECISION, NUMERIC и DECIMAL;

Моля ако има информация, за да се насоча кой тип да избера ....

Благодаря !

Link to comment
Сподели другаде

Май намерих описание:

 

DOUBLE PRECISION 8 bytes 1.7 * 10-308 to 1.7 * 10308 - 15 digits of precision (Note: The size is actually platform dependent.)

 

FLOAT 4 bytes 3.4 * 10-38 to 3.4 * 1038 - 7 digits of precision

 

 

NUMERIC(precision, scale) variable Used to hold exact numbers precision (1 to 15) specifies how many digits to store. scale (1 to 15) (when present) specifies location of decimal point. Must be less than or equal to precision. Example - NUMERIC(10,3) - ppppppp.sss - stores exactly 10 digits

 

DECIMAL(precision, scale) variable Secifies the minimum precision desired, but more is ok precision (1 to 15) specifies the minimum number of digits to store. scale (1 to 15) (when present) specifies location of decimal point. Must be less than or equal to precision. Example – DECIMAL(10,3) - ppppppp.sss - stores at least 10 digits

 

 

 

 

Link to comment
Сподели другаде

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гост
Отговори на тази тема

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   Не можете да качите директно снимка. Качете или добавете изображението от линк (URL)

Loading...
×
×
  • Създай ново...