标题:求大家帮忙
只看楼主
jiazhao200
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2009-3-8
结帖率:0
已结贴  问题点数:20 回复次数:2 
求大家帮忙
想写一个存储过程,查询的命令是这样的,那位老师帮忙一下。刚接触存储过程。
select a.xmmc,a.gg,a.sl,a.je,a.je,b.xm
from mz_cfmx a inner join mz_cf b on a.cfbh=b.cfbh
where a.cfbh=''
搜索更多相关主题的帖子: 存储 inner where 
2010-01-10 12:14
happynight
Rank: 8Rank: 8
等 级:贵宾
威 望:15
帖 子:807
专家分:760
注 册:2008-4-26
得分:10 
Create Procedure test(@cfbh varchar(20))
AS
BEGIN
  select a.xmmc,a.gg,a.sl,a.je,a.je,b.xm
  from mz_cfmx a inner join mz_cf b on a.cfbh=b.cfbh
  where a.cfbh=@cfbh
END
看下SQL的帮助就是 你这个很简单的 SQL的帮助功能很强大
2010-01-11 09:14
foktime
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:奥斯维辛
等 级:贵宾
威 望:35
帖 子:795
专家分:2742
注 册:2009-9-4
得分:10 
语法
程序代码:
CREATE { PROC | PROCEDURE } [schema_name.] procedure_name [ ; number ] 
    [ { @parameter [ type_schema_name. ] data_type } 
        [ VARYING ] [ = default ] [ OUT | OUTPUT ] [READONLY]
    ] [ ,...n ] 
[ WITH <procedure_option> [ ,...n ] ]
[ FOR REPLICATION ] 
AS { <sql_statement> [;][ ...n ] | <method_specifier> }
[;]
<procedure_option> ::= 
    [ ENCRYPTION ]
    [ RECOMPILE ]
    [ EXECUTE AS Clause ]

<sql_statement> ::= 
{ [ BEGIN ] statements [ END ] }

<method_specifier> ::=
EXTERNAL NAME assembly_name.class_name.method_name
2010-01-12 09:14



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-295389-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.377544 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved