Thread: TRUNC vs. TRUNCATE

TRUNC vs. TRUNCATE

From
Christopher Kings-Lynne
Date:
Hi,

I notice we added CEILING() as an alias to CEIL() for compatibility.  We 
also have POWER() for POW().

I notice that MySQL uses TRUNCATE() and we only have TRUNC().  Is 
TRUNCATE actually spec compliant?  Should we add TRUNCATE anyway for 
consistency and compatibility?

Chris


Re: TRUNC vs. TRUNCATE

From
Bruce Momjian
Date:
Christopher Kings-Lynne wrote:
> Hi,
> 
> I notice we added CEILING() as an alias to CEIL() for compatibility.  We 
> also have POWER() for POW().
> 
> I notice that MySQL uses TRUNCATE() and we only have TRUNC().  Is 
> TRUNCATE actually spec compliant?  Should we add TRUNCATE anyway for 

I don't see either in the SQL99 standard.

> consistency and compatibility?

No, if we did that we would be carrying around a ton of stuff.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073