| List: | General Discussion | « Previous MessageNext Message » | |
| From: | gerald_clark | Date: | April 11 2003 2:33pm |
| Subject: | Re: rounding/truncation of decimal fields | ||
| View as plain text | |||
Why do you find this surprising? You defined the field to have 2 deciimal places.. Matt Loschert wrote: >I have quick question about rounding and/or truncation of a decimal table >field. I ran into this unexpectedly and found it surprising. > >Given the following input: > > > DROP TABLE IF EXISTS test1; > CREATE TABLE test1 (id tinyint, truncated decimal(12,2)); > INSERT INTO test1 VALUES (1, '0.004'); > INSERT INTO test1 VALUES (2, 0.004 ); > INSERT INTO test1 VALUES (3, '0.005'); > INSERT INTO test1 VALUES (4, 0.005 ); > SELECT * FROM test1; > SELECT VERSION(); > > > >
| Thread | ||
|---|---|---|
| • rounding/truncation of decimal fields | Matt Loschert | 10 Apr |
| • Re: rounding/truncation of decimal fields | gerald_clark | 11 Apr |
| • RE: rounding/truncation of decimal fields | Clifton R [CC] Jones | 11 Apr |
| • Re: rounding/truncation of decimal fields | gerald_clark | 11 Apr |
| • Re: rounding/truncation of decimal fields | Matt Loschert | 11 Apr |
| • Re: rounding/truncation of decimal fields | Doug Thompson | 11 Apr |
| • Re: rounding/truncation of decimal fields | Matt Loschert | 12 Apr |
| • Re: rounding/truncation of decimal fields | Doug Thompson | 12 Apr |
| • More on enum | Martin Gainty | 12 Apr |
| • Re: rounding/truncation of decimal fields | Matt Loschert | 13 Apr |
| • Re: rounding/truncation of decimal fields | Doug Thompson | 13 Apr |
| • Re: rounding/truncation of decimal fields | Dan Nelson | 13 Apr |
| • Re: rounding/truncation of decimal fields | Matt Loschert | 14 Apr |
| • Re: rounding/truncation of decimal fields | Moon796 | 11 Apr |
