摘要:
1.如表中没有主键,先添加自动增长主键 alter table 表名 add 列名 int identity (1,1) primary key 2.删除重复数据 delete from 表名 where id not in (select min(id) from 表名 group by id) 阅读全文
摘要:
假如有一个数据表格UserInfo: public class UserInfo { public int Id { get; set; } public string Name { get; set; } public string Pwd { get; set; } public int Sex 阅读全文
摘要:
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_ 阅读全文
摘要:
在Model文件夹下添加一个类MyActionFilterAttribute继承于ActionFilterAttribute: using System; using System.Collections.Generic; using System.Linq; using System.Web; u 阅读全文