码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
oracle删除用户所有表
在删除数据表的时候往往遇到外键约束无法删除的情况,我们可以通过以下几步将数据库表删除,建议在删除库之前先对数据库进行备份,养成良好习惯。1.删除外键--查询用户所有表的外键,owner条件为userselect * from user_constraints c where c.constraint...
分类:数据库   时间:2015-03-17 00:40:07    阅读次数:266
mybatis CRUD
方法一:通过配置文件 delete from users where id=#{id} update users set name=#{name}, age=#{age} where id=#{id} ...
分类:其他好文   时间:2015-03-17 00:32:55    阅读次数:178
oracle存储过程中游标的使用
一. 使用for循环游标: 1. 定义游标(游标就是一个小集合) 2. 定义游标变量 3. 使用for循环游标 declare -- 定义游标c_job cursor c_job is select empno, ename, job, sal from emp where job = 'MANAGER'; -- 定义游标变量c_row c_row c_j...
分类:数据库   时间:2015-03-16 23:10:03    阅读次数:212
mysql 如何创建一个简单的存储过程
1 用mysql客户端登入2 选择数据库 mysql>use test3 查询当前数据库有哪些存储过程 mysql>show procedure status where Db='test'4 创建一个简单的存储过程 mysql>create procedure hi() select 'he...
分类:数据库   时间:2015-03-16 23:02:02    阅读次数:207
**CI中的order_by在get_where之前
public function show_list_by_order($array_data, $order_field, $order_mode) { $query = $this->db->get_where('xm_attach', $array_data); ...
分类:其他好文   时间:2015-03-16 21:12:40    阅读次数:172
A1007. Maximum Subsequence Sum (25)
Given a sequence of K integers { N1, N2, ..., NK}. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj} where 1 5 #include 6 #include 7 #...
分类:其他好文   时间:2015-03-16 19:10:05    阅读次数:109
mysql order by 出现Using filesort的解决办法
http://blog.csdn.net/yangyu112654374/article/details/4251624比如一条sql语句select * from TABLE1 where A1=1 and A2=2 and A3=3 order by A4 ASC;优化后是这样: select ...
分类:数据库   时间:2015-03-16 19:07:27    阅读次数:539
查找XTWL_TB中的重复条数
(1)规格型号不为空:select * from sm_zdb_xtwl_TB t where exists( select 1 from sm_zdb_xtwl_TB where ID != t.ID and WLMC=t.WLMC and GGXH=t.GGXH) (2)规格型号为空:...
分类:其他好文   时间:2015-03-16 16:14:59    阅读次数:124
织梦DedeCMS首页调用单页文档内容的方法
很多使用织梦dedecms单页文档功能的朋友都想知道如何在织梦首页调用单页文档的内容,下面就教大家具体的实现方法:具体步骤如下:首先在首页模板需要显示单页文档内容的地方插入如下代码:{dede:sql sql="SELECT body FROM `dede_sgpage` where aid = 3...
分类:其他好文   时间:2015-03-16 16:01:32    阅读次数:135
删除表中重复记录大于两条保存两条
--删除表中重复记录大于两条保存两条delete from t_Cht_clm_reg F where F.case_id in (select T.case_id from (select B.* from (select e.* , row_number() over (partition b....
分类:其他好文   时间:2015-03-16 15:48:47    阅读次数:100
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!