Need to solve the Sql and JMP queries from the file attached below

mysql project and need the explanation and answer to help me learn.

Need to solve and write the JMP and Sql queries. Should be Done in Sql and need it in a Sql file doc. (Total questions-3)
Will send the JMP queries once you accept the assignment. Should be done in JMP only( Total questions-3)
Requirements: As required for a whole of 20 points for Sql and as required for JMP.
1.WriteascriptthatcreatesandcallsastoredprocedurenamedspInsertDepartment.First,codeastatementthatcreatesaprocedurethataddsanewrowtotheDepartmentstable.Todothat,thisprocedureshouldhaveoneparameterforthedepartmentname.CodeatleasttwoEXECstatementsthattestthisprocedure.(Notethatthistabledoesn’tallowduplicatedepartmentnames.)4.WriteascriptthatcreatesandcallsastoredprocedurenamedspInsertInstructorthatinsertsarowintotheInstructorstable.Thisstoredprocedureshouldacceptoneparameterforeachofthesecolumns:LastName,FirstName,Status,DepartmentChairman,AnnualSalary,andDepartmentID.ThisstoredprocedureshouldsettheDateAddedcolumntothecurrentdate.IfthevaluefortheAnnualSalarycolumnisanegativenumber,thestoredprocedureshouldraiseanerrorthatindicatesthatthiscolumndoesn’tacceptnegativenumbers.CodeatleasttwoEXECstatementsthattestthisprocedure.5.WriteascriptthatcreatesandcallsastoredprocedurenamedspUpdateInstructorthatupdatestheAnnualSalarycolumnintheInstructorstable.ThisprocedureshouldhaveoneparameterfortheinstructorIDandanotherfortheannualsalary.IfthevaluefortheAnnualSalarycolumnisanegativenumber,thestoredprocedureshouldraiseanerrorthatindicatesthatthevalueforthiscolumnmustbeapositivenumber.CodeatleasttwoEXECstatementsthattestthisprocedure.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *