> > hi SQLite Users please i requard floor for make rounddown
> > please help me for how can rounddown
>
>cast(myNumericColumn as integer)
>round(myNumericColumn - 0.5)

SQLite round() with one argument seems to behave just like, say C, 
floor() under a different name, but cast(myNumericColumn as integer) 
differs from floor for negative values.

select cast(0.6 as integer), round(0.6 - 0.5);
0|0

select cast(0.1 as integer), round(0.1 - 0.5);
0|0

select cast(-0.1 as integer), round(-0.1 - 0.5);
0|-1

select cast(-0.6 as integer), round(-0.6 - 0.5);
0|-1


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to