The 11th chapter uses the data processing function

Source: Internet
Author: User

1. The portability of the function is not strong compared to the portability of SQL 2. The text-processing function left () returns the length of the string () () to return the string locate () to find the string of strings lower () to turn the string into lowercase ltrim () to remove the left space ritht () Returns the character to the right of the string RTrim () strips the right-hand space Soundex () returns the Soundex value of the string  

3. Date and time processing function adddate () adds a date adddate (date, INTERVAL expr unit), adddate (expr,days) The following table shows the expected form of the expr argument for each unit value.

Addtime () Add a time (hour, minute, etc)
Date_add () Date arithmetic function is equivalent to adddate () effect after using INTERVAL flag date_add (date, INTERVAL expr unit)

Date () returns the datetime time of Year () the Day of the month (s) to get the date


DayOfWeek () for a date to return its subscript for the day of the week, 1 indicates that the year of Sunday () gets the date of the month part of the return date () returns the date part of the hour () returns the date when part of the minute () returns the date of the clock part second () Gets the second part of the date
Note: The date format is best: "Yyyy-mm-dd", so as to avoid ambiguity 4. Numeric processing function ABS () returns the absolute value of the passed-in value cos () returns an angle of the cosine exp () returns the X-exponent of E after mod () returns the remainder of the action () Pi () return pi
RAND () returns a random value of sin () that returns a sine of an angle sqrt () returns a number of square root tan () that returns the tangent of a number

  

The 11th chapter uses the data processing function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.