Monday , December 10 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

sql server backup script

Backup all databases in SQL Instance with one script

Backup: A copy of SQL Server data that can be used to restore and recover the …