finalista Публикувано Юли 10, 2011 Report Share Публикувано Юли 10, 2011 По какво се различават числените полета във Firebird ?Искам да сложа полета за таблица за стоки:ID избирам INTEGER, макар че мога да избера BIGINT или SMALLINT;NAME избирам VARCHARPRICE се колебая между FLOAT, DOUBLEPRECISION, NUMERIC и DECIMAL;Моля ако има информация, за да се насоча кой тип да избера ....Благодаря ! Цитирай Link to comment Сподели другаде More sharing options...
finalista Публикувано Юли 10, 2011 Author Report Share Публикувано Юли 10, 2011 Май намерих описание: 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 Сподели другаде More sharing options...
finalista Публикувано Юли 11, 2011 Author Report Share Публикувано Юли 11, 2011 И се чудя кой от двата типа да използвам:DOUBLE PRECISION илиDECIMAL ? Цитирай Link to comment Сподели другаде More sharing options...
finalista Публикувано Юли 14, 2011 Author Report Share Публикувано Юли 14, 2011 След размисляне избрах DECIMAL. Цитирай Link to comment Сподели другаде More sharing options...
Препоръчан пост
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.