printf¶
This function is used to print the input in a specific format.
Syntax¶
printf(String format, Obj... args)
Parameters¶
Parameter  | Mandatory  | Type  | Description  | 
|---|---|---|---|
format  | Yes  | STRING  | Output format  | 
Obj  | No  | STRING  | Other input parameters  | 
Return Values¶
The return value is of the STRING type.
The value is returned after the parameters that filled in Obj are specified for format.
Example Code¶
The string name: user1, age: 20, gender: female, place of origin: city 1 is returned.
SELECT printf('Name: %s, Age: %d, Gender: %s, Place of origin: %s', "user1", 20, "Female", "City 1");