Supported SQL Functions and Operators
On this page
- Comparison Functions and Operators
- Logical Operators
- JOIN Expressions
- Control Flow Functions and Operators
- String Functions
- Numeric Functions and Operators
- Date and Time Functions
- Cast Functions and Operators
- Subquery Constructors
- Information Functions
GROUP BY
(Aggregate) Functions- Utility Statements
- Database Administration Statements
The following tables list the various MySQL functions, constructors, and operators supported in MongoDB Connector for BI 2.2.
Comparison Functions and Operators
Function/Operator | Description | |
---|---|---|
| Check whether a value is within a range of values | |
| Return the first non-NULL argument | |
| Equal operator | |
| NULL-safe equal to operator | |
| Greater than operator | |
| Greater than or equal operator | |
| Return the largest argument | |
| Test for the existence of a record you specify in a subquery | |
| Check whether a value is within a set of values | |
| Return the 0-based index position of last number in the list to be
For example:
Returns | |
| Test a value against a boolean | |
| Test a value against a boolean | |
| NOT NULL value test | |
| NULL value test | |
| Test whether the argument is NULL | |
| Return the smallest argument | |
| Less than operator | |
| Less than or equal operator | |
| Simple pattern matching | |
| Check whether a value is not within a range of values | |
| Not equal operator | |
| Check whether a value is not within a set of values |
Logical Operators
Function/Operator | Description |
---|---|
| Logical AND |
| Negates value |
| Logical OR |
| Logical XOR |
JOIN Expressions
Expression | Description |
---|---|
| Select records that have matching values in multiple tables. |
| Semantically equivalent to |
| Return all records from the left table, and the matched records from the right table. |
| Return all records from the right table, and the matched records from the left table. |
| Return only records which do not appear in both tables. |
| Return all records where the given columns appear in both tables. |
Control Flow Functions and Operators
Function/Operator | Description |
---|---|
| Case operator |
| If/else construct |
| Null if/else construct |
| Return NULL if expr1 = expr2 |
String Functions
Function/Operator | Description |
---|---|
| Return numeric value of left-most character |
| Return number of characters in argument |
| Synonym for CHAR_LENGTH() |
| Return concatenated string |
| Return concatenate with separator |
| Return string at index number |
| Insert a substring at the specified position up to the specified number of characters |
| Return the index of the first occurrence of substring |
| Synonym for LOWER() |
| Return the leftmost number of characters as specified |
| Return the length of a string in bytes |
| Return the position of the first occurrence of substring |
| Return the argument in lowercase |
| Remove leading spaces |
| Return a substring starting from the specified position |
| Negation of simple pattern matching |
| Negation of REGEXP |
| Pattern matching using regular expressions |
| Replace occurrences of a specified string |
| Return the specified rightmost number of characters |
| Remove trailing spaces |
| Return a string of the specified number of spaces |
| Return the substring as specified |
| Return the substring as specified |
| Return a substring from a string before the specified number of occurrences of the delimiter |
| Remove leading and trailing spaces |
| Synonym for UPPER() |
| Convert to uppercase |
Numeric Functions and Operators
Function/Operator | Description |
---|---|
| Return the absolute value |
| Return the arc cosine |
| Return the arc sine |
| Return the arc tangent |
| Return the arc tangent of the two arguments |
| Return the smallest integer value not less than the argument |
| Return the smallest integer value not less than the argument |
| Return the cosine |
| Return the cotangent |
| Convert radians to degrees |
| Integer division |
| Division operator |
| Raise to the power of |
| Return the largest integer value not greater than the argument |
| Return the natural logarithm of the argument |
| Return the natural logarithm of the first argument |
| Return the base-10 logarithm of the argument |
| Return the base-2 logarithm of the argument |
| Minus operator |
| Return the remainder |
| Modulo operator |
| Return the value of pi |
| Addition operator |
| Return the argument raised to the specified power |
| Return the argument raised to the specified power |
| Return argument converted to radians |
| Round the argument |
| Return the sign of the argument |
| Return the sine of the argument |
| Return the square root of the argument |
| Return the tangent of the argument |
| Multiplication operator |
| Truncate to specified number of decimal places |
| Change the sign of the argument |
Date and Time Functions
Function/Operator | Description |
---|---|
| Add time values (intervals) to a date value |
| Return the current date |
| Synonyms for CURDATE() |
| Synonyms for NOW() |
| Extract the date part of a date or datetime expression |
| Returns the difference, in days, between two specified dates. |
| Add time values (intervals) to a date value |
| Format date as specified |
| Subtract a time value (interval) from a date |
| Synonym for DAYOFMONTH() |
| Return the name of the weekday |
| Return the day of the month (0-31) |
| Return the weekday index of the argument |
| Return the day of the year (1-366) |
| Extract part of a date |
| Convert a day number to a date |
| Extract the hour |
| Return the last day of the month for the argument |
| Create a date from the year and day of year |
| Return the microseconds from the input time or datetime expression as a number between 0 and 999999 inclusive. |
| Return the minute from the argument |
| Return the month from the date passed |
| Return the name of the month |
| Return the current date and time |
| Return the quarter from a date argument |
| Return the second (0-59) |
| Convert a string to a date |
| Synonym for DATE_SUB() when invoked with three arguments |
| Return the argument converted to seconds |
| Subtract time |
| With a single argument, this function returns the date or datetime |
| Add an interval to a datetime expression |
| Subtract an interval from a datetime expression |
| Return the date argument converted to days |
| Return the current UTC date and time |
| Return the week number |
| Return the weekday index |
| Return the calendar week of the date (1-53) |
| Return the year |
| Return the year and week |
Cast Functions and Operators
Function | Description |
---|---|
| Cast a value as a certain type |
| Convert a value as a certain type |
For more information on how the BI Connector performs type conversions, see Type Conversion Modes.
Subquery Constructors
Function | Description |
---|---|
| Returns one row of values rather than one column of values |
Information Functions
Function | Description |
---|---|
| Return the connection ID (thread ID) for the connection |
| The authenticated user name and host name |
| Return the default (current) database name |
| Synonym for |
| Synonym for |
| Synonym for |
| The user name and host name provided by the client |
| Return a string that indicates the MySQL server version |
| Return information about an SQL query without running it or fetching results. Includes the full aggregation operation which BI Connector will send to MongoDB. |
GROUP BY
(Aggregate) Functions
Function | Description |
---|---|
| Return the average value of the argument |
| Return a count of the number of rows returned |
| Return the count of a number of different values |
| Return the maximum value |
| Return the minimum value |
| Return the population standard deviation |
| Return the population standard deviation |
| Return the population standard deviation |
| Return the sample standard deviation |
| Return the sum |
| Return a concatenated string, non- |
Utility Statements
Statement | Description |
---|---|
| Choose the database to use as the current database for subsequent statements |
Database Administration Statements
Statement | Description |
---|---|
| Shows the structure of the |
| Shows
By default the |
| Use to:
|
| Use to rename one or more tables. |