How to Work with Data Manipulation Functions
An aggregate function derives it value from an aggregation, or group, of values. A data manipulation function (also known as a "scalar function") derives its value from a single column value. For example, we can convert a character column value to all uppercase or lowercase.
To learn how work with data manipulation functions in a SQL select statement, follow these steps:
- You'll need to setup the MySQL database tables. The instructions for the setup can be found in How to add comments in simple SQL selects. Follow steps 1 through 7 before proceeding to the next step.
- Now we'll explore a couple of data manipulation functions using one select statement.
- Imagine we are required to display each city name in upper case and lower case. Execute the following statement:
upperdata manipulation function returns its argument in upper case. The
lowerdata manipulation function returns its argument in lower case.