• 全部
  • 基础类
  • 应用实例
  • 新技术前沿

谁能帮我将以下SQL代码写成存储过程 马上送上100分!

coollele 2015-02-06 03:39:55
SELECT ID, u_no, u_name, b_tel3, u_tel1, u_tel2, U_bank1, U_bank2, U_bank3, u_del, u_del1, u_del2, U_qc, U_fw
FROM huiyuan
WHERE (U_cs = 0) AND (u_del = 0)
ORDER BY u_no
...全文
446 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
老张一笑 2015-03-06
有语句的都给分,别给我,给我跟你急;
回复
C_B_Lu 2015-02-09
为什么要写成存储过程? 楼主想达到怎样的效果?
回复
kobe_lai 2015-02-09
create procedure xxx
	as
	SELECT ID, u_no, u_name, b_tel3, u_tel1, u_tel2, U_bank1, U_bank2, U_bank3, u_del, u_del1, u_del2, U_qc, U_fw
	FROM  huiyuan
	WHERE (U_cs = 0) AND (u_del = 0)
	ORDER BY u_no
回复
sddcs 2015-02-06
学习了
回复
洞房不敗 2015-02-06
create procedure Pro_select_huiyuan(@U_cs int , @u_del int)
as 
SELECT     ID, u_no, u_name, b_tel3, u_tel1, u_tel2, U_bank1, U_bank2, U_bank3, u_del, u_del1, u_del2, U_qc, U_fw
FROM         huiyuan
WHERE     (U_cs = @U_cs) AND (u_del = @u_del )
ORDER BY u_no
直接复制过去用 , 传了两个参数
回复
CREATE PROC PROCNAME
AS
SELECT     ID, u_no, u_name, b_tel3, u_tel1, u_tel2, U_bank1, U_bank2, U_bank3, u_del, u_del1, u_del2, U_qc, U_fw
FROM         huiyuan
WHERE     (U_cs = 0) AND (u_del = 0)
ORDER BY u_no 
我也来凑凑热闹
回复
卖水果的net 版主 2015-02-06

-- 把那两个做成参数吧。
create procedure xxx(@U_cs int , @u_del int)
as 
SELECT     ID, u_no, u_name, b_tel3, u_tel1, u_tel2, U_bank1, U_bank2, U_bank3, u_del, u_del1, u_del2, U_qc, U_fw
FROM         huiyuan
WHERE     (U_cs = @U_cs) AND (u_del = @u_del )
ORDER BY u_no

回复
CREATE PROC PROCNAME
AS
SELECT     ID, u_no, u_name, b_tel3, u_tel1, u_tel2, U_bank1, U_bank2, U_bank3, u_del, u_del1, u_del2, U_qc, U_fw
FROM         huiyuan
WHERE     (U_cs = 0) AND (u_del = 0)
ORDER BY u_no 
我也来凑凑热闹
回复
tcmakebest 2015-02-06
没见过如此没有技术含量的问题.
create procedure xxx
as 
SELECT     ID, u_no, u_name, b_tel3, u_tel1, u_tel2, U_bank1, U_bank2, U_bank3, u_del, u_del1, u_del2, U_qc, U_fw
FROM         huiyuan
WHERE     (U_cs = 0) AND (u_del = 0)
ORDER BY u_no
回复
相关推荐
发帖
MS-SQL Server
创建于2007-09-28

3.3w+

社区成员

MS-SQL Server相关内容讨论专区
申请成为版主
帖子事件
创建了帖子
2015-02-06 03:39
社区公告
暂无公告