码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
数据库索引技术
技术原理 索引是对数据库表中一个或多个列(例如,employee 表的姓名 (name) 列)的值进行排序的结构。如果想按特定职员的姓来查找他或她,则与在表中搜索所有的行相比,索引有助于更快地获取信息。 例如这样一个查询:select * from table1 where id=10000。如果没有索引,必须遍历整个表,直到ID等于10000的这一行被找到为止;有了索引之后(必须是在ID这一...
分类:数据库   时间:2015-04-22 11:40:44    阅读次数:215
LeetCode 11 Container With Most Water 装尽可能多的水
题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, ...
分类:其他好文   时间:2015-04-22 11:36:08    阅读次数:165
数据库连接数使用情况监控
查看每一个用户的数据库连接数:select s.USERNAME,count(p.PID) from v$session s ,v$process p where s.PADDR = p.ADDR group by s.USERNAME;查看数据库允许的最大连接数select value from ...
分类:数据库   时间:2015-04-22 11:25:12    阅读次数:206
oracle 随机数(转载)
http://blog.sina.com.cn/s/blog_6a01140c0100wimi.html1、从表中随机取记录select * from (select * from staff order by dbms_random.random)where rownum < 4表示从STAFF表...
分类:数据库   时间:2015-04-22 09:26:04    阅读次数:172
数据库查询的基本方法,有很多不全的地方,自己学习使用
简单查询:一、查询表名和列名select *from 表名select 列1,列2···from 表名select distinct 列名 from表名 去重只能是一列二、筛选select top 3* from 表名 查询表的前三行select top 3 列名 from 表名 where age...
分类:数据库   时间:2015-04-22 00:16:58    阅读次数:183
Oracle 语言基础
1,基本 select 语句 select *|{[distinct] column|expression [alias],...} from table; distinct 删除重复行2,过滤和排序 where 子句紧随 from子句 字符和日期要包含单引号中 默认日期格式是D...
分类:数据库   时间:2015-04-21 23:59:29    阅读次数:385
[LeetCode]Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin...
分类:其他好文   时间:2015-04-21 22:41:35    阅读次数:156
Largest Rectangle in Histogram*****
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
分类:其他好文   时间:2015-04-21 22:06:27    阅读次数:155
SQL语句中like下划线不起作用
在用【select * from psx_element where ele_id like '%ref_%'】查询是,表中出现了很多不包含【ref_】的结果。经过一番度娘,终于了解。因为下划线是通配符,需要用escape转义函数,写成下面的语句就可以了。select * from psx_elem...
分类:数据库   时间:2015-04-21 20:03:07    阅读次数:149
oracle11g 导出空表
--对已存在的表 执行如下 ,要经过统计分析后 num_rows=0 才准确select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0Oracle11g默认对空表不分配segmen....
分类:数据库   时间:2015-04-21 20:01:13    阅读次数:204
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!