Tuesday , June 19 2018
Home / DataBase / SQL SERVER / Multirow Functions:-

Multirow Functions:-

Multirow Function:-
These functions process group of Rows and Return one value.
This functions are also called group functions or aggregate functions.
1.Max():-
Returns Maximum value

Maximum salary of managers?
select Max(sal)from emp where Job=’MANAGER’
2.Min():-
Returns Minimum value

3.Sum():-
Returns total

4.Avg():-
Returns average value

select Avg (sal) from emp

5.Count():-
Returns no.of values

6.Count(*):-
Returns no.of Records in a table

Q) No.of employes joindate 1981 year
select count(*) from emp
where year(hiredate)=1981
o/p: 10 employees

Print Friendly, PDF & Email

Give us your valuable feedback

comments

About Samba

Check Also

Find all rows count and columns count in single database in sql server

In General for any database it contains lot of tables, if we want to find …

%d bloggers like this: