title: Insert a row in Order table and multiple rows in OrderDetails table via stored procedure
body: <p>I have five tables named <code>guest</code>, <code>orders</code>, <code>order_details</code>, <code>food</code>, and  <code>employees</code>.  Their characteristics are as follows:</p>
  
  <pre><code>create table guest 
  (
   guest_id int primary key identity(1,1),
   guest_fname nvarchar(50),
   national_id int,
   mobile nvarchar(50),
   nationality_id int
  constraint c15
            foreign key(nationality_id) references nationality(nationality_id)
  )
  create table employees
   (
    emp_id int primary key ,
    emp_fname nvarchar(50),
    constraint c1
    --foreign key(mgr_id) references employees(emp_id),
    foreign key(super_id) references employees(emp_id),
    )
    go
    create table food 
    (
     food_id  int primary key identity(1,1),
     food_name nvarchar(50),
     food_price money,
     food_desc nvarchar(200),
     cat_id int
     constraint c5
     foreign key(cat_id) references food_categories(cat_id)
    )
    go
    create table orders
    (
     order_id int primary key identity(1,1),
     order_date datetime,
     total float,
     guest_id int,
     emp_id int,
     is_paid bit
     constraint c6
     foreign key(guest_id) references guest(guest_id),
     foreign key(emp_id) references employees(emp_id)
    )
    go
    create table order_details
    (
     order_id int,
     food_id int,
     price money,
     qty int
     constraint c7
     primary key(order_id,food_id),
     foreign key(order_id) references orders(order_id),
     foreign key(food_id) references food(food_id)
    )
    Go
  </code></pre>
  
  <p><strong>There is a 1-to-M relationship between <code>orders</code> and <code>order_details</code>.</strong></p>
  
  <p>I want to insert a single row into <code>orders</code> and multiple rows into <code>order_details</code> via a stored procedure.  Please help me!</p>
  
  <p>Please give me a stored procedure and explain its algorithm to point me in the right direction.</p>