Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Write the SQL code to CREATE a stored procedure to insert a new row into EMPLOYEE_POSITION: Takes in four parameters: Position Name, Employees first name,

Write the SQL code to CREATE a stored procedure to insert a new row into EMPLOYEE_POSITION:

Takes in four parameters: Position Name, Employees first name, last name and birthdate

Uses variables to look-up required FK values

Inserts a new row in a single explicit transaction (assume IDENTITY function enabled)

image text in transcribed

CUSTOMER_TYPE PK CustTypeID LEVEL PK LevelID SKILL SkilllDh auPK PK SKILL_TYPE SkillTypeID PK CustTypeName CustTypeDescr LevelName LevelDescr EMPLOYEE SKILL HOA" POH- PK Emp SkilllD FK1 SkillTypeID SkillName SkillDescr SkillTypeName SkillTypeDescr FK1 EmplD FK2 SkillID FK3 LevellD EMPLOYEE PK Emplo CUSTOMER CustID JOB_TYPE Job TypeID EMPLOYEE_POSITION PK,FK1 EmplD PK,FK2 PositionID PK PK HD EmpFname EmpLname EmpBirth Date FK1 Job TypeName Job TypeDescr BeginDate EndDate CustTypeID CustFname CustLname CustAddress CustCity Cust State CustZip POH CUST_JOB_TASK PK JobTaskID JOB JobID TASK TaskID POSITION PositionID PK PK Posit PK FK1 FK2 -- - ORDER FK3 TaskName TaskDecsr PK FK4 FK5 Position Name Position Descr OrderID TaskID EquipID ToolID EmpSkillID JobID BeginTime EndTime JobName JobBeginDate JobEndDate FK1 Job TypelD FK2 CustID Job Descr FK1 JobID Order Date EQUIPMENT LINE ITEM PK LineItemID TOOL_TYPE ToolTypeID TOOL ToollD EQUIPMENT_TYPE PK EquipTypeID PK PK PK EquipID HOA --H FK1 FK1 OrderID FK2 ProductID Qty ToolTypeName ToolTypeDescr ToolName ToolTypeID ToolDescr Equip TypeName Equip TypeDescr FK1 Equip TypeID EquipName Equip Decsr PRODUCT ProductID PRODUCT_TYPE Product TypeID TOOL_CONDITION PK ToolConditionID CONDITION ConditionID PK PK PK DO--------- Condition Name ConditionDescr ProductName Price FK1 Product TypeID ProductTypeName Product TypeDescr FK1 Toolid FK2 ConditionID Begin Date

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students explore these related Databases questions