Difference between revisions of "SQL Functions"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 2: | Line 2: | ||
===LOGICAL FUNCTIONS=== | ===LOGICAL FUNCTIONS=== | ||
;IF: | :;IF: | ||
;IFNULL: | :;IFNULL: | ||
===String Functions=== | ===String Functions=== | ||
;CONCAT: | :;CONCAT: | ||
;LENGTH: | :;LENGTH: | ||
===Miscellaneous=== | ===Miscellaneous=== | ||
;DISTINCT: | :;DISTINCT: | ||
===DATE Functions=== | ===DATE Functions=== | ||
;DATE_ADD: | :;DATE_ADD: | ||
;DATEDIFF: | :;DATEDIFF: | ||
;CURDATE: | :;CURDATE: | ||
;NOW: | :;NOW: | ||
;CURTIME: | :;CURTIME: | ||
;DATE_FORMAT: | :;DATE_FORMAT: | ||
;DATE_SUB: | :;DATE_SUB: | ||
;DATE: | :;DATE: | ||
;DAYOFMONTH: | :;DAYOFMONTH: | ||
;DAYNAME: | :;DAYNAME: | ||
;DAYOFWEEK: | :;DAYOFWEEK: | ||
;DAYOFYEAR: | :;DAYOFYEAR: | ||
;EXTRACT: | :;EXTRACT: | ||
;FROM_UNIXTIME: | :;FROM_UNIXTIME: | ||
;HOUR: | :;HOUR: | ||
;LAST_DAY: | :;LAST_DAY: | ||
;MINUTE: | :;MINUTE: | ||
;MONTH: | :;MONTH: | ||
;MONTHNAME: | :;MONTHNAME: | ||
;SEC_TO_TIME: | :;SEC_TO_TIME: | ||
;SECOND: | :;SECOND: | ||
;STR_TO_DATE: | :;STR_TO_DATE: | ||
;SUBTIME: | :;SUBTIME: | ||
;TIME_TO_SEC: | :;TIME_TO_SEC: | ||
;TIME: | :;TIME: | ||
;TIMEDIFF: | :;TIMEDIFF: | ||
;TO_DAYS: | :;TO_DAYS: | ||
;UNIX_TIMESTAMP: | :;UNIX_TIMESTAMP: | ||
;YEAR: | :;YEAR: | ||
===AGGREGATE Functions=== | ===AGGREGATE Functions=== | ||
;SUM: | :;SUM: | ||
;AVG: | :;AVG: | ||
;COUNT: | :;COUNT: | ||
;MAX: | :;MAX: | ||
;MIN: | :;MIN: | ||
;STD: | :;STD: | ||
;VARIANCE: | :;VARIANCE: | ||
;ROUND: | :;ROUND: |
Revision as of 01:18, 11 November 2011
These functions can be used in your SQL statements.
LOGICAL FUNCTIONS
- IF
- IFNULL
String Functions
- CONCAT
- LENGTH
Miscellaneous
- DISTINCT
DATE Functions
- DATE_ADD
- DATEDIFF
- CURDATE
- NOW
- CURTIME
- DATE_FORMAT
- DATE_SUB
- DATE
- DAYOFMONTH
- DAYNAME
- DAYOFWEEK
- DAYOFYEAR
- EXTRACT
- FROM_UNIXTIME
- HOUR
- LAST_DAY
- MINUTE
- MONTH
- MONTHNAME
- SEC_TO_TIME
- SECOND
- STR_TO_DATE
- SUBTIME
- TIME_TO_SEC
- TIME
- TIMEDIFF
- TO_DAYS
- UNIX_TIMESTAMP
- YEAR
AGGREGATE Functions
- SUM
- AVG
- COUNT
- MAX
- MIN
- STD
- VARIANCE
- ROUND