create view ProvProdView
as
(select Product_Sorts.name,ProvID,Discription,Price,SotpMake,Memo
from Prov_Products ,Product_Sorts
where (Prov_Products.ProvID=:Providers.ID ) and (Prov_Products.ProductID=Product_Sorts.ID)
)其中‘Prov_Products.ProvID=:Providers.ID ’是为了将Providers作为主表,而把Prov_Products做为从表
as
(select Product_Sorts.name,ProvID,Discription,Price,SotpMake,Memo
from Prov_Products ,Product_Sorts
where (Prov_Products.ProvID=:Providers.ID ) and (Prov_Products.ProductID=Product_Sorts.ID)
)其中‘Prov_Products.ProvID=:Providers.ID ’是为了将Providers作为主表,而把Prov_Products做为从表
不过我不知道存储过程如何返回:select * from table!
你提前一下,这里会有高人的!!!up
create procedure ProvProd
@ID char(20)
AS
select Product_Sorts.name,ProvID,Discription,Price,SotpMake,Memo
from Prov_Products ,Product_Sorts
where (Prov_Products.ProvID=@ID ) and (Prov_Products.ProductID=Product_Sorts.ID)
Go