<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    Chapter 6:  MySQL Language Reference 399 reason  the  hours  part  may  be  so  large  is  that  the  TIME  type  may  be  used  not  only  to represent a time of day (which must be less than 24 hours), but also elapsed time or a time interval between two events (which may be much greater than 24 hours, or even negative). You can specify TIME values in a variety of formats:    As a string in  'D HH:MM:SS.fraction'  format.  (Note that MySQL doesn't yet store the  fraction  for  the  time  column.)   One  can  also  use  one  of  the  following  \relaxed" syntax: HH:MM:SS.fraction,  HH:MM:SS,  HH:MM,  D HH:MM:SS,  D HH:MM,  D HH  or  SS.   Here  D  is days between 0-33.    As a string with no delimiters in  'HHMMSS'  format, provided that it makes sense as a time.  For example, '101112' is understood as '10:11:12', but '109712' is illegal (it has a nonsensical minute part) and becomes '00:00:00'.    As a number in  HHMMSS  format,  provided that it makes sense as a time.   For exam- ple, 101112 is understood as '10:11:12'.  The following alternative formats are also understood:  SSMMSS,HHMMSS, HHMMSS.fraction.  Note that MySQL doesn't yet store the fraction part.    As the result of a function that returns a value that is acceptable in a  TIME  context, such as CURRENT_TIME. For TIME values speci ed as strings that include a time part delimiter, it is not necessary to specify two digits for hours, minutes, or seconds values that are less than 10.  '8:3:2' is the same as '08:03:02'. Be careful about assigning \short" TIME values to a TIME column.  Without colons, MySQL interprets values using the assumption that the rightmost digits represent seconds. (MySQL interprets  TIME  values  as  elapsed  time  rather  than  as  time  of  day.)   For  example,  you might think of '1112' and 1112 as meaning '11:12:00' (12 minutes after 11 o'clock), but MySQL interprets them as '00:11:12' (11 minutes, 12 seconds).  Similarly, '12' and 12 are interpreted as '00:00:12'.  TIME values with colons, by contrast, are always treated as time of the day.  That is '11:12' will mean '11:12:00', not '00:11:12'. Values that lie outside the TIME range but are otherwise legal are clipped to the appropriate endpoint of the range.  For example, '-850:00:00' and '850:00:00' are converted to '- 838:59:59' and '838:59:59'. Illegal TIME values are converted to '00:00:00'.  Note that because '00:00:00' is itself a legal TIME value, there is no way to tell, from a value of '00:00:00' stored in a table, whether the original value was speci ed as '00:00:00' or whether it was illegal. 6.2.2.4  The YEAR Type The YEAR type is a 1-byte type used for representing years. MySQL retrieves and displays YEAR values in YYYY format.  The range is 1901 to 2155. You can specify YEAR values in a variety of formats:    As a four-digit string in the range '1901' to '2155'.    As a four-digit number in the range 1901 to 2155.
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN REGISTRATION
    MANAGE YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    SITE MAP
    Home
    Hosting Plans | Domain Registration | About Us | Contact Us | Site Map
    Terms of Use | Privacy Policy | Guarantees
    Merchant Accounts

    SpiritHost - web hosting for spiritual and education sites
    SpiritHit.com - Religious and Spiritual Portal
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide