数据库
current_bp
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
orcale union后 排序问题
--1: selectidfromgongysb union select 0 as id from dual order by id desc; --2: select id from gongysb union select 0 as id from dual order by 1 desc;原创 2015-12-28 13:42:22 · 505 阅读 · 0 评论 -
orcale update delete 两种写法
--效果一样 update(select*fromgongysbwhereid='986771048')setquanc='山西东庄煤业有限公司1111'; update gongysb set quanc = '山西东庄煤业有限公司' where id='986771048' ; delete from (select id from gongysml where to_char (tj原创 2015-12-30 18:03:09 · 540 阅读 · 0 评论 -
orcale 时间比较 两种方式
1、函数方式 select * fromgongydmzgjdwbwheregongysj< to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss'); 2、 select * from gongydmzgjdwb f where f.gongysj >= date'2015-11-1';原创 2016-01-09 15:58:26 · 534 阅读 · 0 评论 -
orcale 查询两个不同的条件的结果的差值(minus)
select * from gongysb where id in (986771048, 1101771007,1101771002 ) minus select * from gongysb where id in (986771048, 1101771007); --用途: insert gongysb select * from gongysb where id in (原创 2016-01-11 17:26:29 · 1200 阅读 · 0 评论 -
mysql 使用索引和不使用索引的区别
1、首先介绍一下:这个表的主键在live_id和user_id上(有先后顺序), 如果使用live_id查询则使用索引,如果使用user_id则不使用索引 2、order by 不使用索引 3、group by 使用索引时,字段在第一个字段时 ,使用索引,字段在第二个字段时,不使用索引 4、in查询操作,查询字段在第一个字段时 ,使用索引,查询字段在第二个字段时,不使用索引 5、like原创 2017-10-23 11:22:45 · 5246 阅读 · 0 评论
分享