本文介绍了如何通过Store Procdure在select语句中显示两个结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在选择语句中显示拖拽结果按商店流程:





How Can display tow result in select statement By Store Procdure :


ALTER proc  [dbo].[PrinttProducts_TBL]
@Product_id int

as
select pt.Product_id ,pt.Product_name ,pt.Product_Price
from dbo.Products_TBL pt
 inner join  tblcatProducts cp on cp.catId = pt.FK_catId inner join  StoresTBL st on pt.FK_Store_id = st.Store_id
where Product_id=@Product_id and

select DATEADD(year, 1, '2006-08-30') as 'Datenew'

推荐答案

ALTER proc [dbo].[PrinttProducts_TBL]
@Product_id int

as
select pt.Product_id ,pt.Product_name ,pt.Product_Price
from dbo.Products_TBL pt
inner join tblcatProducts cp on cp.catId = pt.FK_catId inner join StoresTBL st on pt.FK_Store_id = st.Store_id
where Product_id=@Product_id

select DATEADD(year, 1, '2006-08-30') as Datenew


这篇关于如何通过Store Procdure在select语句中显示两个结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 13:46