以前update用的不少,但都是简单的单表操作,没有在意,最近查阅多表关联更新及更新top n,发现update还真灵活,记录如下(在mssqlserver2008r2下测试通过):1单表操作update table1 set col1=val[,col2=val2...][where 条件表达式]...
分类:
数据库 时间:
2014-06-19 07:34:09
阅读次数:
264
有重复数据主要有一下几种情况:1.存在两条完全相同的纪录 这是最简单的一种情况,用关键字distinct就可以去掉 example: select distinct * from table(表名) where (条件)2.存在部分字段相同的纪录(有主键id即唯一键) 如果是这种...
分类:
其他好文 时间:
2014-06-18 15:08:18
阅读次数:
173
A monolithic kernel is a kernel where all services (file system, VFS, device drivers, etc) as well as core functionality (scheduling, memory allocatio...
分类:
其他好文 时间:
2014-06-18 12:45:23
阅读次数:
361
??
Where Can the UML Be Used
The UML is intended primarily for software-intensive systems. It has been used effectively for such domains as
Enterprise information systems
Banking and financial ser...
分类:
其他好文 时间:
2014-06-18 11:53:00
阅读次数:
190
// Playground - noun: a place where people can playimport Cocoavar nums = Int[]()for _ in 1...50{ nums.append(random())}nums////冒泡排序/*var count = 0...
分类:
移动开发 时间:
2014-06-18 09:57:23
阅读次数:
303
MySQL中的内置系统函数 用在SELECCT语句, 能及子句 where order by having 中 UPDATE DELETE, 函数中可以将字段名作为变量来用,变量的值就是这个列对应的每一行记录一、字符串函数 php中用的函数,MySQl中大部也提供 1. CONCAT(S1,S...
分类:
数据库 时间:
2014-06-17 23:53:34
阅读次数:
419
1、Oracle中的SQL select count(1)from a_V_PWYZL_CUSTACCT_PSMIS t where not exists (select 1 from tb_show_multi_question q WHERE q.dqmp_rule_code = '仅比对系统有...
分类:
数据库 时间:
2014-06-17 23:29:32
阅读次数:
309
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and (i,
0). Fin...
分类:
其他好文 时间:
2014-06-17 22:17:43
阅读次数:
325
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such po...
分类:
其他好文 时间:
2014-06-17 21:15:35
阅读次数:
211
SELECT * FROM tab WHERE time = (SELECT MAX(time) FROM tab) 找出时间最近的一条记录
分类:
数据库 时间:
2014-06-17 20:13:30
阅读次数:
203