1 SELECT?‘alter?table?‘||?t.table_name||‘?disable?constraint?‘||t.constraint_name||‘;‘?
FROM?user_constraints?t?WHERE?t.constraint_type?=?‘R‘; 2 SELECT?‘ALTER?TABLE?‘||?table_nam...
分类:
数据库 时间:
2015-05-26 19:15:34
阅读次数:
135
No.42 Trapping Rain WaterGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able...
分类:
移动开发 时间:
2015-05-26 18:13:46
阅读次数:
240
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2015-05-26 18:13:18
阅读次数:
136
----查询所有的表SELECT * FROM SYSOBJECTS WHERE TYPE='U' ----根据表名查询所有的字段名及其注释 SELECT A.NAME,B.VALUE FROM SYSCOLUMNS A LEFT JOIN SYS.EXTENDED_PROPERTIES...
分类:
数据库 时间:
2015-05-26 18:10:35
阅读次数:
207
近期项目使用分页,学习了下常见几种数据库下分页查询语句,如下【转载于作者:守护熊猫】:1.oracle数据库分页 select * from (select a.*,rownum rc from 表名 where rownum=startrow 2.DB2数据库分页 Select * from (s...
分类:
数据库 时间:
2015-05-26 18:04:42
阅读次数:
194
转自:http://blog.sina.com.cn/s/blog_af26e333010194ht.html最近修改oracle触发器,在过程中遇到两个问题:select lastname from hrmresource where id in (waigaunyanshourens);此sql...
分类:
数据库 时间:
2015-05-26 17:56:57
阅读次数:
217
如菜单表。每个角色能够看到的菜单是不同的。项目方案:登录时取得能看到哪些菜单,如: Id: 1,2,3,4,10在对查询时,截获 OnReading 事件,对Where条件进行加工,添加 Id in( 1,2,3,4,10) 设置当前执行上下文using (var conf = new MyOqlC...
分类:
其他好文 时间:
2015-05-26 16:01:38
阅读次数:
102
更新语法dbr.表.Update(实体).Where(条件).Execute();实体类型:更新的实体类型和添加的实体类型一样,有三类:1. 任何C#类。2. 字典3. WhereClip 表达式问题1. 如果没有Where条件 ,虽然编译正确,但是在运行时会报错,这是为了防止程序员犯低级的错误。如...
分类:
其他好文 时间:
2015-05-26 15:38:47
阅读次数:
185
方法一:var query = db.Test.Where(x => true) .Include(x => x.ColB.Select(s => s.ColBRelated)) .Include(x => x.ColC)方法二:var query = db.Test.Where(x =...
分类:
其他好文 时间:
2015-05-26 12:36:28
阅读次数:
223
递归上下级部门,获取相关的部门单位部门表:sql语句:with Temp1 as(select GroupID,G_ParentID from sys_Group where GroupID={当前部门GroupID}union allselect sys_Group.GroupID,sys_Gr....
分类:
数据库 时间:
2015-05-26 12:19:50
阅读次数:
278