Home> Common Problem> body text

What are the commonly used functions of informix?

Jennifer Aniston
Release: 2023-10-16 11:08:57
Original
1383 people have browsed it

Informix commonly used functions include mathematical functions, string functions, date and time functions, data type conversion functions, sorting and grouping functions, connection functions, conditional functions, statistical functions, subquery functions and date and time functions. Detailed introduction: 1. Mathematical functions, AVG(), COUNT(), MAX(), MIN(), SUM(), ABS(), ROUND(), TRUNC(); 2. String functions, LENGTH(), SUBSTRING() and so on.

What are the commonly used functions of informix?

#Informix is a relational database management system widely used in enterprise-level applications. In Informix , there are many built-in functions to help users implement various data operations and calculations. The following lists some commonly used Informix functions:

Mathematical functions:

AVG(): Calculate the average.

COUNT(): Count the number of records.

MAX(): Find the maximum value.

MIN(): Find the minimum value.

SUM(): Calculate the sum.

ABS(): Calculate the absolute value.

ROUND(): Rounding function.

TRUNC(): truncation function.

String functions:

LENGTH(): Calculate the length of a string.

SUBSTRING(): Extract string substring.

UPPER(): Convert the string to uppercase.

LOWER(): Convert the string to lowercase.

TRIM(): Remove spaces at both ends of the string.

REPLACE(): Replace a substring in a string.

LOCATE(): Find the position of the substring in the string.

Date and time functions:

CURRENT_DATE(): Get the current date.

CURRENT_TIME(): Get the current time.

CURRENT_TIMESTAMP(): Get the current date and time.

DATE(): Extract the date part.

TIME(): Extract the time part.

TIMESTAMP(): Extract the date and time part.

YEAR(): Extract the year.

MONTH(): Extract the month.

DAY(): Extract the number of days.

HOUR(): Extract the hour.

MINUTE(): Extract minutes.

SECOND(): Extract seconds.

Data type conversion function:

CAST(): Convert data from one type to another.

CONVERT(): Convert data from one type to another.

DECIMAL(): Convert a number to a fixed-point decimal.

DOUBLE(): Convert a number to a floating point number.

FLOAT(): Convert a number to a floating point number.

INTEGER(): Convert a number to an integer.

SMALLINT(): Convert a number to a short integer.

TINYINT(): Convert a number to an ultra-short integer.

CHAR(): Convert numbers to characters.

VARCHAR(): Convert numbers to strings.

Sort and group functions:

ORDER BY(): Sort query results.

GROUP BY(): Group query results.

HAVING(): Filter the grouped results.

Connection function:

CONCAT(): Concatenate multiple strings together.

CONCAT_WS(): Concatenate multiple strings together, using the specified delimiter.

Conditional function:

IF(): Returns different results based on conditions.

IFNULL(): If the parameter is empty, the default value is returned.

COALESCE(): Returns the first non-null parameter.

Statistical functions:

COUNT_IF(): Calculate the number of records based on conditions.

SUM_IF(): Calculate the sum based on conditions.

AVG_IF(): Calculate the average value based on conditions.

MAX_IF(): Find the maximum value based on conditions.

MIN_IF(): Find the minimum value based on conditions.

Subquery function:

IN(): Determine whether a value is in the result set of the subquery.

NOT IN(): Determine whether a value is not in the result set of the subquery.

EXISTS(): Determine whether the subquery has results.

NOT EXISTS(): Determine whether the subquery has no results.

ALL(): Determine that all results of the subquery meet the conditions.

ANY(): Determine that at least one result of the subquery satisfies the condition.

Date and time functions:

INTERVAL(): Calculate the interval between date and time.

YEAR_MONTH(): Calculate the year and month interval between dates.

DAY_ONLY(): Extract the number of days in the date.

HOUR_ONLY(): Extract the hour in the time.

MINUTE_ONLY(): Extract the minutes in the time.

SECOND_ONLY(): Extract the number of seconds in the time.

The above is the detailed content of What are the commonly used functions of informix?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!