摘要: monthsalesPerMonth122332445363写条SQL语句把上表转成下表:month总销量122537411514617答案:selects2.[month],Sum(s1.salesPerMonth)as'总销量' FromSaless1,Saless2 where s1.[month]<=s2.[month] Groupbys2.[month] 阅读全文
posted @ 2013-10-12 16:29 yangzhenping 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Num124678101113写条SQL语句转成下表:Column1 Column21 24 46 810 1113 13selectMIN(Num),MAX(Num)from (selectROW_NUMBER()over (orderbyNum)rk,NumFromNumbers)AGroupby (A.rk-A.Num)orderbyMin(Num) 阅读全文
posted @ 2013-10-12 16:19 yangzhenping 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 每个对象只有在该对象不存在任何引用才会被垃圾回收起回收。可以调用静态方法System.GC.Collect()垃圾回收器,但是不建议这么做;用using语句可以有效的自动释放掉资源。实在没有办法才用从析构函数中调用Dispose方法。 class Example:IDisposable ~example(){ Dispose(); } public virtual void Dispose(); { if(!this.disposed){ try{ //在此释放稀缺资源 } finally{ this.disposed=true; GC.SuppressFinalize(this); } } 阅读全文
posted @ 2013-10-10 11:16 yangzhenping 阅读(1036) 评论(0) 推荐(1) 编辑
摘要: 表A记录如下:aID aName1 a12 a23 a34 a45 a5表B记录如下:bID bXuehao120061024012 20061024023 20061024034 20061024046 2006102406SELECT * FROM A LEFT JOIN B ON A.aID =B.bID结果如下:aID aName bID bXuehao1 a1 1 20061024012 a2 2 20061024023 a3 3 20061024034 a4 4 20061024045 a5 NULL NULL(所影响的行数为 5 行)结果是基于A表的SELECT * FROMAR 阅读全文
posted @ 2013-10-10 10:34 yangzhenping 阅读(493) 评论(0) 推荐(0) 编辑
摘要: ID Course1AA1BB2AA2BB2CC3AA3BB3CC3DD4AANULLNULL选出选课数量>=2的学号selectdistinctIDfromtestasAwhere (Selectcount(ID)fromtestasBwhereA.ID=B.ID)>=2123 阅读全文
posted @ 2013-10-10 10:19 yangzhenping 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 分享3个未注册微博类域名vbo8.cn微博吧vboba.cn微博吧vceshi.com.cn微测试(网上现在可以免费下载到99个应用的源码http://pan.baidu.com/s/1gNYGn或者http://pan.baidu.com/share/link?uk=3224659490&shareid=1985312786我已经搭了一个升级版的在vceshi.ihaonet.com) 阅读全文
posted @ 2013-10-06 09:43 yangzhenping 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 众所周知msdn和csdn在IT界享有盛誉。Microsoft Developer Network-MSDNChinese software develop net-CSDN分享以下4个未注册域名,有想做技术社区的赶紧注册哈!vsdn.cnksdn.cnqsdn.cntsdn.cn 阅读全文
posted @ 2013-10-06 09:02 yangzhenping 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Action Method Result动作方法结果ActionResultgeneric return value for an action and is used to perform a framework-level operation on behalf of the action method.通用的返回值的一个动作,是用来代表的动作方法执行框架级操作。ContentResultTo return a user-defined content type that is the result of an action method.要返回用户定义的内容类型的操作方法是这样的结果。E 阅读全文
posted @ 2013-09-29 19:17 yangzhenping 阅读(255) 评论(0) 推荐(0) 编辑
摘要: Html Helpers@Html.AntiForgeryTokenIt generates a hidden form field (anti-forgery token) that is validated when the form is submitted.它会产生一个隐藏的表单字段(防伪标记),提交表单时验证。@Html.AttributeEncodeTo convert the specified attribute value to an HTML-encoded string.HTML编码的字符串转换成指定的属性值。@Html.EncodeTo convert the spec 阅读全文
posted @ 2013-09-29 18:28 yangzhenping 阅读(293) 评论(0) 推荐(0) 编辑
摘要: Html帮助类used to render (modify and output) HTML form elements用来渲染HTML表单元素(修改和输出)Html.ActionLink输出: ..Html.BeginForm输出: Html.CheckBox输出: Html.DropDownList输出: Html.EndForm输出: Html.Hidden输出: Html.ListBox输出: Html.Password输出: Html.RadioButton输出: Html.TextArea输出: …Html.TextBox输出: Html.ValidationSummaryRetu 阅读全文
posted @ 2013-09-29 18:21 yangzhenping 阅读(194) 评论(0) 推荐(0) 编辑