**Contents**show

## What are the different types of SQL function?

**Categories of SQL Functions**

- Single row function: Single row functions are those functions which return a single result row for each row of queried table or view. …
- Aggregate function: …
- Analytic function: …
- Model Functions: …
- User defined function: …
- Scalar functions:

## How many functions are there in SQL?

For doing operations on data sql has many built-in functions, they are categorised in two categories and further sub-categorised in different **seven functions** under each category.

…

SQL | Functions (Aggregate and Scalar Functions)

NAME | DateTime |
---|---|

RAM | 1/13/2017 1:30:11 PM |

## What is difference between function and procedure?

Function is used to calculate something from a given input. Hence it got its name from Mathematics. While procedure is the set of commands, which are executed in a order.

## What is difference between stored procedure and function?

The function must return a value but in Stored Procedure it is **optional**. Even a procedure can return zero or n values. Functions can have only input parameters for it whereas Procedures can have input or output parameters. Functions can be called from Procedure whereas Procedures cannot be called from a Function.

## What is SQL transaction?

A transaction is **a sequence of operations performed (using one or more SQL statements) on a database as a single logical unit of work**. The effects of all the SQL statements in a transaction can be either all committed (applied to the database) or all rolled back (undone from the database).

## What is scalar query in SQL?

A scalar subquery expression is **a subquery that returns exactly one column value from one row**. The value of the scalar subquery expression is the value of the select list item of the subquery. … If the subquery returns more than one row, then Oracle returns an error.

## What is data integrity in SQL?

Data Integrity is **used to maintain Accuracy and consistency of data in the Table**. Data Integrity is used to maintain accuracy and consistency of data in a table.