select * from table1 a where b=(select max(b) from table1 where a=a.a)select jy_version, member_id from mid owhere o.jy_version =(select max(p.jy_vers...
分类:
其他好文 时间:
2014-06-15 22:15:29
阅读次数:
151
for ( decl : coll ){ statement}where decl is the declaration of each element of the passed collection coll and for which the statements specified are....
分类:
其他好文 时间:
2014-06-15 22:11:18
阅读次数:
295
1、左关联查询var lst = from m in db.信息 join d in db.明细信息 on m.单号 equals d.单号 into mi from dt in mi.DefaultIfEmpty() //dt标示右表 where m.单号 == "2014" && dt.编码.S...
分类:
其他好文 时间:
2014-06-15 21:09:49
阅读次数:
189
select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in (...
分类:
数据库 时间:
2014-06-15 20:39:31
阅读次数:
195
做权限的时候,通过role角色中的roleid,在auth权限中查找角色对应的权限。sql语句:SELECT authName from auth where authId in (1,2,3,4,5)in后面的东西即是角色所具有的各个权限的id,可以查出1,2,3,4,5对应的权限名字。于是结合a...
分类:
数据库 时间:
2014-06-15 20:22:39
阅读次数:
484
drop table e1 purge;drop table e2 purge;create table e1 as select ename,sal,hiredatefrom emp where 9=0;create table e2 as select ename,deptno,mgrfrom ...
分类:
其他好文 时间:
2014-06-15 19:53:02
阅读次数:
249
SELECT @type=t.name, @prec=c.prec FROM sysobjects o JOIN syscolumns c on o.id=c.id JOIN systypes t on c.xusertype=t.xusertype WHERE o.name = @SortTa.....
分类:
数据库 时间:
2014-06-15 16:06:18
阅读次数:
182
查看哪个IP访问量大,访问了什么地址,大可以看到攻击者IP:select c-ip,count(c-ip) AS allcount,cs-uri-stem,cs-uri-query,cs(User-Agent)from#IISW3C# WHERE to_string(date,'yyyy-MM-dd...
分类:
其他好文 时间:
2014-06-15 07:55:08
阅读次数:
300
use UserCentergoselect * from AccountDetails1、判断一个字段是否为null值,进行查询:update AccountDetails set ProjectCode ='w88' where ProjectCode is null2、这一种写法是错误的upd...
分类:
数据库 时间:
2014-06-15 07:25:11
阅读次数:
272
1、删除一个表的重复数据 所用的table_name一样DELETE FROM table_name a WHERE rowid > ( SELECT min(rowid) FROM table_name b WHERE b.id = a.id and b.name=a.name)...
分类:
数据库 时间:
2014-06-14 18:39:34
阅读次数:
289