USE [cms] GO /****** Object: StoredProcedure [dbo].[SpGetRelatedProducts] Script Date: 10/10/2012 23:55:39 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER proc [dbo].[SpGetRelatedProducts](@pid int) AS select * from product join subcategory on subcategory.subcate_id=category.cate_id where product.subcate_id in ( select subcate_id from product where pid = @pid )
from product join subcategory on subcategory.subcate_id=category.cate_id
from product join subcategory on subcategory.subcate_id=product.subcate_id
where pid = @pid
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)