码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
分页sql优化
如果分页sql里包含排序:select * from (...order by id) where rownum <=20因为要排序,所以即使是分页只取20条,执行计划还是要把所有满足条件的记录到取出来,然后再整体进行排序,再取结果的20条返回。假如满足条件的结果很多,这个sql的性能会比较差。如何...
分类:数据库   时间:2015-09-17 13:30:40    阅读次数:152
ibatis中井号跟美元符号区别(#、$)
1、#可以进行预编译,进行类型匹配,#变量名# 会转化为 jdbc 的 类型 $不进行数据类型匹配,$变量名$就直接把 $name$替换为 name的内容 例如: select * from tablename where id = #id# ,假设id的值为12,其中如果数据库字段...
分类:其他好文   时间:2015-09-17 11:50:59    阅读次数:191
ORACLE转义字符的那点事
在oracle中,某些字符表示的有特殊的含义的,比如说&符号,表示变量替换;%表示在查询过程中的通配符下面列出一些在ORACLE中有特殊含义的字符作以测试:符号功能类型%在where子句中表示0到任意个字符通配符_在where子句中表示确切的未知字符通配符?在where子句中表示确切的位置字符通配符...
分类:数据库   时间:2015-09-17 11:31:41    阅读次数:198
[LeetCode 238] Product of Array Except Self
Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Solve it without division and in O(n)....
分类:其他好文   时间:2015-09-17 08:48:02    阅读次数:145
Container With Most Water 解答
QuestionGivennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpo...
分类:其他好文   时间:2015-09-17 06:25:06    阅读次数:120
xml读取类
public class XmlHelper where T :class { XmlReader reader = null; public XmlHelper(string filePath) { if (File.Exists(filePath)) { ...
分类:其他好文   时间:2015-09-17 01:12:07    阅读次数:199
MySQL命令显示所有可供查询的分类
MySQL命令显示所有可供查询的分类mysql> ? contents; You asked for help about help category: "Contents" For more information, type 'help ', where is one of the following categories: Account Management Administ...
分类:数据库   时间:2015-09-16 23:33:51    阅读次数:233
使用xshell进行导出oracle的dmp文件,加查询条件
最近做了一个导出的工作,在用xshell过程中,发现在自己的电脑上用cmd命令导出的dmp文件,在用xshell工具导出时报错。cmd上执行的命令:exp ***/***@oracle file=d:\tbissamt.dmp tables=(tbissamt) query=\"where tran...
分类:数据库   时间:2015-09-16 18:00:31    阅读次数:198
查询某个字段不在查询结果中的记录
参考新浪文章http://blog.csdn.net/liuxilil/article/details/6718409--测试不可select * from [dbo].[Storage_WeiWai] where WeiWaiId not in (select RowGuid from [dbo]...
分类:其他好文   时间:2015-09-16 17:57:38    阅读次数:158
sql语句:创建事物
BEGIN TRAN Tran_Money --开始事务DECLARE @tran_error int;SET @tran_error = 0; BEGIN TRY UPDATE tb_Money SET MyMoney = MyMoney - 30 WHERE Name...
分类:数据库   时间:2015-09-16 17:53:26    阅读次数:170
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!