1、使用distinct查询所有不重复的记录2、创建数据表相同结构的临时表,将第一步的数据复制进去
create temporary table if not exists student_temp as (select distinct(name), sex
from student);3、tru...
分类:
数据库 时间:
2014-06-13 06:04:01
阅读次数:
290
原题地址:https://oj.leetcode.com/problems/trapping-rain-water/题意:Givennnon-negative
integers representing an elevation map where the width of each bar is ...
分类:
移动开发 时间:
2014-06-12 23:35:22
阅读次数:
409
关于处理小数点位数的几个oracle函数()1. 取四舍五入的几位小数select
round(1.2345, 3) from dual;结果:1.2352. 保留两位小数,只舍select trunc(1.2345, 2) from
dual;结果:1.23select trunc(1.2399,...
分类:
数据库 时间:
2014-06-12 23:19:06
阅读次数:
324
方法1.go to the Product menu and find the Edit
Scheme menu there.While in Edit Scheme window, select the "Run" option on the
left hand side of the scree...
分类:
其他好文 时间:
2014-06-12 21:03:42
阅读次数:
317
修改表数据先给class表增加几行数据以便操作mysql>insertintoclassmysql>(sname,gender,company,fanbu)mysql>valuesmysql>(‘xiaoxiao‘,‘男‘,‘腾讯‘,200),mysql>(‘xiaoqing‘,‘女‘,‘百度‘,300);mysql>select*fromclass;修改数据将xiaoxiao的fanbu数据增加200my..
分类:
数据库 时间:
2014-06-10 23:23:21
阅读次数:
276
在my.ini的段[mysqld]中增加skip-grant-tables(只增加它即可)2.重启mysql服务3.打开cmd,转向mysql的安装路径C:\ProgramFiles\MySQL\MySQLServer5.1\bin4.输入mysql-uroot-p5.密码输入空,这时会自动转向sql输入方式6.输入usemysql7.输入updateusersetpassword=password(‘新..
分类:
数据库 时间:
2014-06-10 23:21:56
阅读次数:
342
查询要素:查哪张表的数据?查哪些列?select*fromclass-----表示查询所有行和列的数据*代表所有列,表名后不加where条件,则选所有行,因此取所有行和列例:实验一:取部分列,所有行,取所有人的姓名和工资mysql>selectsname,salaryfromclass;查id>10的人的所有列mysql..
分类:
数据库 时间:
2014-06-10 23:16:54
阅读次数:
271
内存管理–SQLServer2005/2008/2008r2SQLServer2012以前的版本(SQL2005/2008/2008R2),有singlepageallocator和multipageallocator。也就是说,如果申请的内存是8k以内的,就会有单页分配器分配,而大于8kb的内存请求,使用multipage分配器来管理。如图所示。使用select*fro..
分类:
数据库 时间:
2014-06-10 22:38:09
阅读次数:
363
The gray code is a binary numeral system where
two successive values differ in only one bit.Given a non-negative
integernrepresenting the total number...
分类:
其他好文 时间:
2014-06-10 19:38:39
阅读次数:
199
本笔记继续使用dept部门表,emp员工表,一对多多对一双向映射。1 条件查询1.1 查询
员工表emp中 年龄eage小于30,月薪esal大于20000的员工姓名enamesql:select ename from emp where
eage?;hql: select ename from E...
分类:
系统相关 时间:
2014-06-10 16:55:49
阅读次数:
471