IT 509: Database Management System Lab Assignment 3
IT 509: Database Management System Lab Assignment 3
1) 2) 3) 4) WriteaPL/SQLcodetofindthefactorialofanumber. WriteaPL/SQLcodetocheckagivennumberisprimeornot. WriteaPL/SQLcodetocheckagivenyearisleapyearornot. WriteaPL/SQLprogramthatacceptaccountnofromterminalandupdatetheamount byaddingRs.2000iftheamountislessthan5000.Theupdateisreflectedindeposit table. WriteaPL/SQLcodeforreversingastring. Createanemployeetable(emp).WriteaPL/SQLcodeforthefollowing. a) Acceptanemployeecodefromtheuserandfindthenameoftheemployee. b) AddrowinEMP.Ifemployeecodeisduplicatethendisplayamessage. 7) 8) 9) WriteaPL/SQLprogramforthefollowing.Acceptabranchnamefromtheuser.Delete alltheborrowrowswiththatbranchname.Showhowmanyrowshavebeendeleted. WriteaPL/SQLcodetolistcustomersalongwiththeiramount,whoareeither borrowersordepositorsandliveinKolkata. WriteaPL/SQLcodetotakethecustomernameanddeletealldatarelatedtothat customername.
5) 6)
10) Writeacursorprogramtoacceptanaccountnoandincreaseamountby2000. a) Displaymessagebasedonexistenceofrecords. b) Insertarecordaccordinglyindeposit_raise(acc_no,sysdate,incr_amt)table. 11) Writeacursorprogramtoraisetheamountofcustomerby5%whosebranchis Kolkataanddisplayhowmanyrowsareaffectedinthedeposittable. 12) Writeacursorprogramtodeletefirst5rowsindeposittable. 13) Writeacursorprogramtodeleteallusersofbranch'Standard'ofKolkata&display howmanyrowsareaffected.