SQL Functions

SQL has many worked in capacities for performing estimations on data.

SQL Aggregate Functions

SQL total capacities return a solitary esteem, determined from qualities in a column.

Useful total functions:

  • AVG() - Returns the normal value
  • COUNT() - Returns the quantity of rows
  • FIRST() - Returns the first value
  • LAST() - Returns the last value
  • MAX() - Returns the biggest value
  • MIN() - Returns the littlest value
  • SUM() - Returns the sum

SQL Scalar functions

SQL scalar capacities return a solitary esteem, in light of the information value.

Useful scalar functions:

  • UCASE() - Converts a field to upper case
  • LCASE() - Converts a field to bring down case
  • MID() - Extract characters from a content field
  • LEN() - Returns the length of a content field
  • ROUND() - Rounds a numeric field to the quantity of decimals specified
  • NOW() - Returns the present framework date and time
  • FORMAT() - Formats how a field is to be displayed