TRUNC vs. TRUNCATE

Started by Christopher Kings-Lynneabout 20 years ago2 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

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

#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: TRUNC vs. TRUNCATE

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, Pennsylvania 19073