Hql functions and hql Functions

Source: Internet
Author: User
Tags mathematical functions

Hql functions and hql Functions

Serial number Function Name Description Type Supported Usage Remarks
1 ABS (n) Take absolute value Mathematical functions JPAQL HQL ABS (column_name [numeric object attributes])  
2 SQRT (n) Take the square root Mathematical functions JPAQL HQL SQRT (column_name [numeric object attributes])  
3 MOD (x, y) Returns the remainder. Mathematical functions JPAQL HQL MOD ([object attribute (number) or value], [object attribute (number) or value]) The number must be an integer. The remainder of parameter 1/parameter 2 is returned.
4 SIZE (c) Number of objects in the method set Set Functions JPAQL HQL    
5 MINELEMENT (c) Returns the smallest element in a collection. Set Functions HQL    
6 MAXELEMENT (c) Returns the largest element in a collection. Set Functions HQL    
7 MININDEX (c) Returns the minimum index of the index set. Set Functions HQL    
8 MAXINDEX (c) Returns the maximum index of an index set. Set Functions HQL    
9 MAX (n) Returns the maximum value. Set Functions JPQHQL HQL    
10 MIN (n) Returns the minimum value. Set Functions JPQHQL HQL    
11 COUNT (n) Return count Set Functions JPQHQL HQL    
12 CONCAT (s1, s2) Connect to a string String Functions JPQHQL HQL CONCAT ([Object Attributes], [Object Attributes])  
13 SUBSTRING (s, offset, length) Returns a substring. String Functions JPQHQL HQL SUBSTRING ([string attribute field to be truncated], start position, truncation length)  
14 TRIM ([[BOTH/LEADING/TRAILING] char FROM s) Spaces on both sides of the string are removed by default. String Functions JPQHQL HQL TRIM ([String object attribute column]) Remove spaces at both ends of the field
15 LOWER (s) Lowercase String Functions JPQHQL HQL LOWER ([String object attribute column]) Uppercase letters in the result of this column
16 UPPER (s) Uppercase String Functions JPQHQL HQL UPPER ([String object attribute column]) Uppercase letters in the result of this column
17 LENGTH (s) Returns the string length. String Functions JPQHQL HQL LENGTH (field name) The length of the returned field content, including numbers. Null is returned.
18 CURRENT_DATE () Returns the current database date. Time Functions JPAQL HQL CURRENT_DATE () Returns the current database date.
19 CURRENT_TIME () Time Time Functions JPAQL HQL CURRENT_TIME () Returns the current database time.
20 SECOND (d) Extract specific seconds from date Time Functions HQL SECOND (time field) If it is null, null is returned.
21 MINUTE (d) Extract specific score from date Time Functions HQL MINUTE (time field) If it is null, null is returned.
22 HOUR (d) Extract specific hours from date Time Functions HQL HOUR (Time Field If it is null, null is returned.
23 DAY (d) Extract specific days from date Time Functions HQL DAY (time field) If it is null, null is returned.
24 MONTH (d) Extract specific month from date Time Functions HQL MONTH (time field) If it is null, null is returned.
25 YEAR (d) Extract a specific year from a date Time Functions HQL YEAR (time field) If it is null, null is returned.

 

 


Related Article

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.