Friday, 17 November 2017

Learn Sql server in hindi/urdu part-8 Aggregate function with inner joi...





use sql1707b1





select * from sys.tables



select * from employee

select * from department





--display maximum salary from employee table

select max(emp_salary)from employee





--display minimum salary from employee table

select min(emp_salary) from employee





--display avg salary from employee table



select avg(emp_salary) from employee





--display no.of employees record from employee table

select count(emp_id) from employee







--display, how many employees are working in Hr Department with salary >10000



 select count(e.emp_id) from employee e inner join

  department d on d.dept_id=e.dem_deptid where e.emp_salary>10000 and d.dept_name='HR'



;


No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...