You are here: Update the salary of each manager to be double the average salary of the employees he/she manages « MsSQL Server « IT news, forums, messages
Update the salary of each manager to be double the average salary of the employees he/she manages

Posted by satish on 03/23/06 12:07

create table employee(empid int,empname varchar(20),managerid int not
null, sal int)

insert into employee values(1,'ranga',22,5000)
insert into employee values(2,'satish',22,8000)
insert into employee values(3,'sunil',11,4500)
insert into employee values(4,'sridhar',22,2000)
insert into employee values(5,'ramesh',33,12000)
insert into employee values(6,'srini',22,16000)
insert into employee values(7,'sashi',33,54000)
insert into employee values(8,'rajani',22,71000)
insert into employee values(9,'praveen',11,6060)
insert into employee values(10,'bhaskar',22,11120)
insert into employee values(11,'baba',33,9000)

create table employment (managerid int,managername varchar(20),sal int)

insert into employment values(11,'rob',2500)
insert into employment values(22,'babu',5000)
insert into employment values(33,'ram',6000)



now my problem is

Update the salary of each manager to be double the average
salary of the employees he/she manages

pls help

sati

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация