sql server 存储过程 语句
CREATEPROCEDURE[dbo].[P_GetTrainListByPlace]--Addtheparametersforthestoredprocedurehe...
CREATE PROCEDURE [dbo].[P_GetTrainListByPlace]
-- Add the parameters for the stored procedure here
@vc_FromPlace varchar,
@vc_ToPlace varchar
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
if(@vc_FromPlace is null)
begin
SELECT * from [tb_Train] where vc_FromPlace =@vc_FromPlace
end
else if(@vc_ToPlace is null)
begin
SELECT * from [tb_Train] where vc_ToPlace =@vc_ToPlace
end
else
begin
SELECT * from [tb_Train] where (vc_FromPlace =@vc_FromPlace) and (vc_ToPlace =@vc_ToPlace)
end
END
======================================================
请看看我写的对不?
为什么执行了却没有显示数据? 展开
-- Add the parameters for the stored procedure here
@vc_FromPlace varchar,
@vc_ToPlace varchar
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
if(@vc_FromPlace is null)
begin
SELECT * from [tb_Train] where vc_FromPlace =@vc_FromPlace
end
else if(@vc_ToPlace is null)
begin
SELECT * from [tb_Train] where vc_ToPlace =@vc_ToPlace
end
else
begin
SELECT * from [tb_Train] where (vc_FromPlace =@vc_FromPlace) and (vc_ToPlace =@vc_ToPlace)
end
END
======================================================
请看看我写的对不?
为什么执行了却没有显示数据? 展开
1个回答
今至电子科技有限公司
2024-08-23 广告
2024-08-23 广告
数据库备份是确保数据安全与业务连续性的关键环节。我们上海今至电子科技有限公司高度重视数据保护,定期执行全面的数据库备份策略。这包括使用先进工具和技术,对关键业务数据进行自动化备份,并存储在安全可靠的外部存储介质或云端。通过定期验证备份的完整...
点击进入详情页
本回答由今至电子科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询