You are on page 1of 2

Department of Mathematics and Computer Applications PSG COLLEGE OF TECHNOLOG EEE !

S"# $ %&&& SEMESTE' 'D(MS LA( ) P'O(LEM SHEET & 1. CREATE the table EMPTABLE with the following fields. Field Name EMP#! NAME C#T( !)B *E+ !), *ALAR( !EPARTMENT data type n$me i" "ha a"te "ha a"te date "ha a"te date n$me i" "ha a"te width % 1' 1' 1 ./ 0 1' Const aint P ima y &ey not n$ll not n$ll Fo M not n$ll between 10''' and 1'''' ACC o F#N o E!P !es" iption Employee id !ate of bi th !ate of -oining

0. #N*ERT app op iate e"o ds fo the abo2e table. Empid 1''1 1''0 1''6 1''8 1''1 1''% 1''4 1''. 1''5 1'1' 1'11 1'10 1'16 Name Anish Anandi *hi2a !eepa Engela 7 ish 7amal Neela Bala Ra-esh Re&ha +a2ie 9inotha Cit* Chennai )oty 7ambam T i"hi 7ambam T i"hi )oty Mad$ ai Coimbato e Polla"hi Coimbato e Mad$ ai T i"hi Do( 013ap 3%% 113sep341 '43feb3%% 183feb3%4 063ma 34' 183-$l34' 183-$l3%% 043-$n3%5 053o"t3%0 013ap 3%% 013ap 34' 013ap 341 013ap 340 Se+ M F M M F F M F M M F M F Do, 1'3-$n3.% 143-$n354 013ap 351 013ap 35' 013ap 3.% 013ma 3.5 '83ma 35' '43ap 35' 013ap 356 103o"t356 183de"355 103ma 354 013ap 358 Salar* 14''' 11''' 01''' 10''' 00''' 10''' 10''' 01''' 0'''' 14''' 0'''' 0'''' 14''' Department ACC F#N E!P F#N E!P ACC F#N E!P ACC F#N ACC ACC ACC

6. Answe the following :$e ies by w iting *;L "ommands. 1< 0< 6< 8< 1< %< 4< .< 5< 1'< 11< 10< 16< 18< 11< 1%< 14< 1.< 15< 0'< 01< 00< 06< 08< 01< 0%< 04< 0.< 05< 6'< 61< !isplay the details of all employees !isplay ea"h employee=s id/ name/ "ity and sala y !isplay the employee id with the sala y 2al$e do$bled !isplay employee=s id/ name and sala y with a 1> in" ease $nde a heading ?in" eased sala y? *how the details of employees who ha2e bo n befo e '13-an351 *how the details of the employees ea ning mo e than 0'''' *how the details of the employees ea ning mo e than 0'''' in the dept ACC *how the details of the employees ea ning mo e than 0'''' in ea"h depa tment !isplay the details of the employees f om Coimbato e !isplay the details of the employees f om Coimbato e/ T i"hy and Chennai !isplay the n$mbe of employees !isplay the female employee details Find the n$mbe of male employees Find the n$mbe of male employees depa tment wise !isplay the n$mbe of employees in F#N depa tment Modify :$e y 0 so that it lists employees f om the highest ?in" eased sala y? to the lowest !isplay details of employees whose names sta t with =a= !isplay the e@pe ien"e of ea"h employee in days !isplay the e@pe ien"e of ea"h employee in yea s !isplay all the "ities of the employees !isplay name and age of all employees !isplay name/ "ity and phone no. of employees ea ning mo e than 1'''' !isplay employee=s name and the lowest sala y ea ned by them in ea"h depa tment !isplay name of employee ea ning highest sala y !isplay name of employee ea ning lowest sala y !isplay names/ "ity of employees in alphabeti"al o de !isplay s$m of sala y of employees in ea"h depa tment !isplay name/ date of bi th of employees bo n in ,an$a y !isplay the employee who is the oldest !isplay noA of employees wo &ing in ea"h depa tment !isplay name of employees whose sala ies a e between 1''''' and 4''''

60< 66< 68< 61< 6%< 64< 6.< 65< 8'< 81< 80< 86< 88< 81< 8%< 84< 8.< 85< 1'< 11< 10< 16< 18< 11< 1%< 14< 1.< 15< %'< %1< %0< %6< %8< %1< %%< %4< %.<

Bow old id the oldest employeeC !isplay name/ phone no. of employees ha2ing phone "onne"tion Dhat is the a2e age age of male and female employeesC Dho a e the employees who "eleb ate thei bi thdays in the "$ ent monthC Dhat is the a2e age sala yC Dhat is the a2e age sala y in ea"h depa tmentC Find the s$m of sala ies in ea"h depa tment Bow many employees ea n mo e than 6''''C Find the ma@im$m sala y. Find the ma@im$m sala y in ea"h depa tment. Bow many female employees a e the e "oming f om Coimbato eC !isplay details of those who we en=t bo n in )"tobe and Ma "h !isplay ea"h depa tment with noA of female employees !isplay employee=s name/ "ity. phone no. and dob in any o de !isplay highest/ lowest and a2e age sala y fo those ea ning mo e than 8'''' !isplay sala y diffe en"e between highest and lowest sala y !isplay the depa tment with employees "oming f om mo e n$mbe of "ities Dhi"h depa tment has lowest no of employeesC Dho is the yo$ngest male employee bo n in 15.'C Dho is the oldest female employee bo n in 15.'C #n whi"h yea was the most no. of employees bo nC #n whi"h month was the most no. of employees bo nC Dho a e the male employees ea ning below the a2e age sala y of female employeesC !isplay details of those who a e d awing the same sala yC Bow many diffe ent depa tments a e the e in the tableC !isplay names of employees whose names "ontain $p to 1 "ha a"te s !isplay names of employees whose names "ontain o""$ en"es of the lette =e= !isplay the details of employees "oming f om the "ity ET i"hyF and a e wo &ing in diffe ent depa tments !isplay the details of employees a anged in the o de of thei "ities !isplay the "ity and the n$mbe of employees f om ea"h "ity !isplay the employees who a e f om same "ity and ea n the same sala y !isplay the depa tment in whi"h the e is no employee f om T i"hy Modify the length of the field Name f om 1' to 11. Add a new "ol$mn named age of type n$me i" with length 0. Gpdate the data into age by "omp$ting the 2al$e f om dob. Rename the "ol$mn dob to !ateofBi th. Remo2e the age "ol$mn f om the table.

You might also like