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做为从表

解决方案 »

  1.   

    视图没有你要的功能,可以考虑存储过程!
    不过我不知道存储过程如何返回:select * from table!
    你提前一下,这里会有高人的!!!up
      

  2.   

    建存储过程吧:
    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