码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
Entity Framework where语句起作用的真正用法
之前对Entity Framework的理解不深,只是图方便,作为linqtosql的替代,但是碰到数据库内容非常多(10万-100万条)时,分页效率很低,用 profiler查看sql语句,才发现其竟然是一次性读取全部数据到内容,然后再执行where之后的语句,真是恐怖。在网上查询很久,终于发现以...
分类:其他好文   时间:2014-07-07 00:12:27    阅读次数:166
结息之后本年结转金额没有数据
先检查有没有数据select dqlx,hqlxfrom cpndjx where jxnd = '2014' and ocid = '101';如果有数据,把数据更新到CPYB的ndjxje中去select sum(dqlx)+sum(hqlx) from cpndjx where jxnd = ...
分类:其他好文   时间:2014-07-06 23:02:22    阅读次数:270
mysql_SQL_按照日统计微博数
主要备忘:DATE_FORMAT 函数1:微博对比图(按日统计)SELECT DATE_FORMAT(tw.article_publish_time, '%Y-%m-%d'),count(page_id) FROM `tab_weibo` tw where tw.page_id =100206507...
分类:数据库   时间:2014-07-06 22:37:48    阅读次数:291
ibatis中 $ 于 # 的 区别?
转自:http://www.blogjava.net/lsbwahaha/archive/2009/04/16/266026.html一个项目中在写ibatis中的sql语句时,where user_id in (#user_id_list# ), 运行时总是不行,后来上网查了查,才知道这里不该用#...
分类:其他好文   时间:2014-07-06 19:02:54    阅读次数:130
【leetcode刷题笔记】Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?判断一...
分类:其他好文   时间:2014-07-06 18:10:33    阅读次数:145
Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of...
分类:其他好文   时间:2014-07-04 07:35:58    阅读次数:215
Oracle 分割字符查询
Oracle 分割字符查询 select * from view_psbaseinfo where DECODE('410782001125,411100000043', '', NULL, '410782001125,411100000043') IS NULL or PSCODE in ...
分类:数据库   时间:2014-07-04 07:20:34    阅读次数:349
Kettle笔记: Transformation 笔记
触发器表输入:selecta.*,b.*,0asztflagfromexchange_triggeraleftjoinMAEA_NET_BIZ_BASEINFObon(a.keyvalue=b.id)wherea.flag=0anda.tablename=‘MAEA_NET_BIZ_BASEINFO‘附件处理脚本://Scriptherevarbyte_FILEDATA=null;if(FILEDATA!=null&&FILEDATA!=‘‘){varbb=newP..
分类:其他好文   时间:2014-07-04 06:17:57    阅读次数:279
稍微复杂的sql逻辑(从数据库逆序查找有限条记录(limit))并按相反顺序输出
项目中有一个业务需求是:默认加载15条历史记录(按时间顺序从早到晚)。 下面是我构造的sql逻辑,mark一下,亲测可行。 SELECT * FROM (SELECT *FROM group_chatmsg_v WHERE ((group_Id=46 AND send_user_id=28 AND receive_user_id=70) OR (group_Id=46 AND rece...
分类:数据库   时间:2014-07-03 17:35:32    阅读次数:302
MySql的like语句中的通配符:百分号、下划线和escape
MySql的like语句中的通配符:百分号、下划线和escape %代表任意多个字符 Sql代码 http://blog.csdn.net/yc7369/ select * from user where username like '%huxiao'; select * from user where username like 'huxiao%'; select * ...
分类:数据库   时间:2014-07-03 16:12:41    阅读次数:231
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!