On Nov 2, 2005, at 9:36 AM, [EMAIL PROTECTED] wrote:

Consider the following SQL:

   CREATE TABLE t1(a INTEGER, b REAL);
   INSERT INTO t1 VALUES(5,5);
   SELECT a/2, b/2 FROM t1;

From the above SQL, SQLite version 3.2.7 and earlier will return

   2|2

If my proposed changes for 3.3.0 go in, then the result will be:

   2.5|2.5

If I understand what most people are saying, the SQL standard
says that the result should be:

   2|2.5

Does this correctly summarize the situation?

very clear, very well summarized. And, my vote is FOR your proposed change.

__END__

To extend what Darren Duncan said a while back, perhaps a second div operator (\) could be considered, so

a/2 = 2.5
a\2 = 2

b/2 = 2.5
b\2 = 2.5

but why? The above can already be achieved. So, keep the lite burning brite in SQL.


--
Puneet Kishor

Reply via email to