码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
2020.05.18 综合练习_我的收藏
dao: public List<Favorite> findRidByUid(int uid) { String sql="select * from tab_favorite where uid=?"; return jdbcTemplate.query(sql,new BeanProperty ...
分类:其他好文   时间:2020-05-19 01:03:39    阅读次数:59
MySQL索引优化-性能分析Explain(转)
1. explain是什么 使用explain关键字可以模拟优化器执行SQL查询语句,从而知道MySQL是如何处理你的SQL语句的,分析你的查询语句或是表结构的性能瓶颈。 2. explain能干吗 可用于分析: 表的读取顺序 数据读取操作的操作类型 哪些索引可以使用 哪些索引被实际使用 表之间的引 ...
分类:数据库   时间:2020-05-19 00:30:18    阅读次数:105
子查询
所谓连表查询就是把两张表连接在一起之后,就变成一张大表,从from开始一直到on条件结束就看做一张表 之后可以用where条件 group by 分组 order by limit 都可以正常的使用 子查询: select dep_id from employee group by dep_id h ...
分类:其他好文   时间:2020-05-19 00:27:04    阅读次数:101
PAT 1007 Maximum Subsequence Sum (25分) 最大连续子序列和
题目 Given a sequence of K integers { N?1?? , N?2?? , ..., N?K?? }. A continuous subsequence is defined to be { Ni?? , N?i+1?? , ..., N?j?? } where 1≤i≤ ...
分类:其他好文   时间:2020-05-18 22:37:14    阅读次数:57
Oracle merge into 通过一个表字段,更新另一个表字段
Oracle 通过一个表字段,更新另一个表字段: 方法一:通过update实现 update g_sn_status A set A.out_process_time = (select B.rec_time from g_sn_defect B where B.serial_number = A. ...
分类:数据库   时间:2020-05-18 20:43:53    阅读次数:98
sql索引优化-force index
本周有个优化sql任务,有一条sql慢查询,起初看了下感觉并没有什么问题,但是就是出现了慢查询,后来细究后发现了问题: sql:select id, name, mtime, .... from a force index (mtime) where id >= ? and mtime >= ? a ...
分类:数据库   时间:2020-05-18 20:35:43    阅读次数:187
mysql 指定的字段如果重复(已存在),则不再插入
insert into 表名(待插入字段1,待插入字段2,...,待插入字段n) select '张三','1',...,'袜子' from 表名 a where not exists(select 1 from 表名 b where b.判断条件字段1='张三' and b.判断条件字段2='1' ...
分类:数据库   时间:2020-05-18 18:46:49    阅读次数:196
Django model 常用查询(搬运来备份的)
基本操作 # 获取所有数据,对应SQL:select * from User User.objects.all() # 匹配,对应SQL:select * from User where name = '运维咖啡吧' User.objects.filter(name='运维咖啡吧') # 不匹配,对 ...
分类:其他好文   时间:2020-05-18 16:49:08    阅读次数:52
利用 谷歌 python 快速翻译 英文字幕
前期准备 准备好srt字幕文件 格式例如: 100:00:04,990 --> 00:00:07,759for a long time now I've been wanting to 200:00:07,759 --> 00:00:11,690shoot an episode where I di ...
分类:编程语言   时间:2020-05-18 16:44:54    阅读次数:113
数据库mysql查询
查询表student中的所有数据:select * from student; 只查询表student中的id和name:select id,name from student; 把重复的行删除,在select后面及字段的前面加distinct:如 条件 使用where子句对表中的数据筛选,结果为t ...
分类:数据库   时间:2020-05-18 16:20:31    阅读次数:58
20257条   上一页 1 ... 97 98 99 100 101 ... 2026 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!