03 2016 档案

摘要:--增加 create proc usp_insertToText @productName nvarchar(20), @unit nvarchar(20), @usitPrice decimal as begin insert into TEST1 output inserted.ProductID values(@productName,@unit,@usitPrice) end ... 阅读全文
posted @ 2016-03-29 23:59 黄者之风 阅读(397) 评论(0) 推荐(0)
摘要:1.如表中没有主键,先添加自动增长主键 alter table 表名 add 列名 int identity (1,1) primary key 2.删除重复数据 delete from 表名 where id not in (select min(id) from 表名 group by id) 阅读全文
posted @ 2016-03-27 22:56 黄者之风 阅读(1391) 评论(0) 推荐(0)
摘要:此软件可以把SQL语句转换成LINQ语句 首先把Linqer下载到本地, 1.在VS中创建.dbml文件和.cs文件 打开VS,创建一个控制台项目即可,再添加一个dbml项目 2.添加连接数据库 3.把里面的表全部拖到空白处,保存; 4.打开Linqer,创建连接数据库字符串 5.点击Add,输入C 阅读全文
posted @ 2016-03-18 16:45 黄者之风 阅读(1036) 评论(0) 推荐(0)
摘要:假如有一个数据表格UserInfo: public class UserInfo { public int Id { get; set; } public string Name { get; set; } public string Pwd { get; set; } public int Sex 阅读全文
posted @ 2016-03-06 16:08 黄者之风 阅读(1842) 评论(0) 推荐(0)
摘要:1.添加RouteDebug.dll引用;2.在全局Global文件添加如下代码:RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);3.在Web.config配置文件中,appSettings节点下添加如下内容(此 阅读全文
posted @ 2016-03-05 17:15 黄者之风 阅读(295) 评论(0) 推荐(0)
摘要:在cshtml文件中任意位置添加如下代码: @this.GetType().Assembly.Location 打开反编译器,在ASP---Execute():Void下即可查看原代码 阅读全文
posted @ 2016-03-05 17:14 黄者之风 阅读(250) 评论(0) 推荐(0)
摘要:student表: lag表: 要求将student表stu_id列为1的stu_nick列和stu_phont列的数据更新为lag表的lag_nick列和lag_phone列. SQL语句: update s set s.stu_nick=o.lag_nick,s.stu_phone=o.lag_ 阅读全文
posted @ 2016-03-01 15:11 黄者之风 阅读(828) 评论(0) 推荐(0)