Variable Number of Arguments

Q

What Are Variable Number of Arguments?

✍: FYIcenter.com

A

Variable Number of Arguments is a list of arguments with variable length. It is used to pass a list of multiple values. For example:

SELECT CHAR(70, 89, 73), CHAR(70, 89, 73, 99, 101, 110, 116, 101, 114);
  -- +------------------+-----------------------------------------------+
  -- | CHAR(70, 89, 73) | CHAR(70, 89, 73, 99, 101, 110, 116, 101, 114) |
  -- +------------------+-----------------------------------------------+
  -- | FYI              | FYIcenter                                     |
  -- +------------------+-----------------------------------------------+

SELECT GREATEST(70, 89, 73, 99, 101, 110, 116, 101, 114);
  -- +---------------------------------------------------+
  -- | GREATEST(70, 89, 73, 99, 101, 110, 116, 101, 114) |
  -- +---------------------------------------------------+
  -- |                                               116 |
  -- +---------------------------------------------------+

 

Argument Type Auto-Conversion

Function Argument Modifier

Calling MySQL Built-in Functions

⇑⇑ MySQL Function References

2023-11-15, 240🔥, 0💬