惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
G
Google Developers Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
F
Full Disclosure
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
C
Cisco Blogs
博客园 - 司徒正美
Project Zero
Project Zero
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Scott Helme
Scott Helme
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
T
Threatpost
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
S
Security Archives - TechRepublic
博客园 - Franky
N
News | PayPal Newsroom
Simon Willison's Weblog
Simon Willison's Weblog
S
SegmentFault 最新的问题
W
WeLiveSecurity
A
Arctic Wolf
B
Blog

博客园 - lsyyx

SQL Server 2008中SQL增强之三:Merge(在一条语句中使用Insert,Update,Delete) SQL Server 2008中SQL增强之二:Top新用途 SQL Server 2008中SQL增强之一:Values新用途 SQL Server 2008中增强的汇总技巧 需要弥补的那部分SQL oracle递归查询\sqlserver递归 - lsyyx - 博客园 如何写SQL,计算上下记录同一字段相差值 SQL语句整理资料 Sqlserver Update 用法 Oracle:ODP.NET Managed 小试牛刀 (转) Asp.Net4.0/VS2010新变化(4):SEO的改进 Asp.Net4.0/VS2010新变化(2):网站自动预热 Asp.Net4.0/VS2010新变化(3):webform中也可以直接url路由 NET4.0中非常好用的一个东西Tuple 关于.net4.0中的Action委托 NET4.0多线程编程---Tasks .NET4.0多线程编程---Cooperative Cancellation net4.0新特性之线程同步 C#4.0语言新功能及应用 (1)
可判断datatable的列是否有重复
lsyyx · 2014-10-24 · via 博客园 - lsyyx

 DataTable dt = new DataTable();       

dt.Columns.Add("id");  

 dt.Columns.Add("value");

DataRow dr = dt.NewRow();

 dr["id"] = "1"; 

dr["value"] = "1";            

dt.Rows.Add(dr);            

dr = dt.NewRow();        

dr["id"] = "1";   

 dr["value"] = "2";

 dt.Rows.Add(dr);

 dr = dt.NewRow();   

dr["id"] = "2";  

dr["value"] = "22";

dt.Rows.Add(dr);      

//将dt中的重复数据过滤掉

DataView myDataView = new DataView(dt); 

 //此处可加任意数据项组合 

string[] strComuns = { "id"};

 dt = myDataView.ToTable(true, strComuns);