Database systems and applications 7-on lab reports
where the customer. customer number = purchase order. customer number
as
return 0
Second, experimental elements: the establishment and implementation of stored procedures.
@ gdname varchar (40), @ odate datetime
an experimental purpose: to understand the concept of stored procedures, master the use of stored procedures to enhance the client / server mechanism for understanding.
– Executive
select order number
if @ @ ERROR = 0
return 0
declare @ status int
return -1
@ dates datetime
else
where order number in (
from orders were fine
where the product number in (
set Order Date = @ odate
return -1
print @ status
execute @ status1 = sp_or_cus 011-10-27 lt;br /> select *
select customer name, contact person, phone, order number, order date
as
if @ @ ERROR = 0
create proc sp_upd_date
– 2, the query in a certain period after the date of a purchase order signed by the customer information
select Product No.
@ price1 money, @ price2 money
where Name = @ gdname))
execute @ status2 = sp_upd_date phone 011-10-23 lt;br /> declare @ status2 int
from product
if @ @ ERROR = 0
execute @ status = sp_getgoods 1000,6000
declare @ status1 int
update purchase order
where price > @ price1 and price <@ price2
– 1, the query price range of $ X dollars to Y within the product information
print @ status2
return 0
print @ status1 < br /> else
– Executive
create proc sp_getgoods
3 hours ago
from the customer, purchase order
return -1
three., program source Code:
– 3, the unity of a product to order changes to a specified date
and Order Date> @ dates
else
– Executive
from product
as
create proc sp_or_cus
