博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2017年2月21日

摘要: //创建用户自定义函数 标量函数 create function dbo.bmrs(@bmh as int) returns int as begin declare @bmrs int select @bmrs=count(工号) from 销售人员 where 部门号=@bmh return @ 阅读全文

posted @ 2017-02-21 20:07 preface小贝 阅读(183) 评论(0) 推荐(0) 编辑

摘要: 一.WITH AS的含义 WITH AS短语,也叫做子查询部分(subquery factoring),可以让你做很多事情,定义一个SQL片断,该SQL片断会被整个SQL语句所用到。有的时候,是为了让SQL语句的可读性更高些,也有可能是在UNION ALL的不同部分,作为提供数据的部分。 特别对于U 阅读全文

posted @ 2017-02-21 17:09 preface小贝 阅读(457) 评论(0) 推荐(0) 编辑

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace stringConvertClass { class test { public void Method() 阅读全文

posted @ 2017-02-21 10:42 preface小贝 阅读(232) 评论(0) 推荐(0) 编辑

摘要: public static string GetPrintList(string data) { string[] _data = data.Split(','); string Order_No = _data[0].ToString(); string val = _data[1].ToStri 阅读全文

posted @ 2017-02-21 09:58 preface小贝 阅读(106) 评论(0) 推荐(0) 编辑

摘要: DECLARE My_Cursor CURSOR --定义游标FOR (SELECT * FROM dbo.MemberAccount) --查出需要的集合放到游标中OPEN My_Cursor; --打开游标FETCH NEXT FROM My_Cursor ; --读取第一行数据WHILE @@ 阅读全文

posted @ 2017-02-21 09:32 preface小贝 阅读(110) 评论(0) 推荐(0) 编辑