数据库 (database)
文章平均质量分 58
beiyetengqing
http://blog.youkuaiyun.com/beiyeqingteng 的镜像站
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Difference between the having clause and the group by statement
In SQL, the having clause and the group by statement work together when using aggregate functions like SUM, AVG, MAX, etc. This is best illustrated by an example. Suppose we have a table called emp_bo转载 2012-12-23 09:58:27 · 696 阅读 · 0 评论 -
Difference between HAVING and WHERE Clause
Answer in one line is : HAVING specifies a search condition for a group or an aggregate function used in SELECT statement. HAVING can be used only with the SELECT statement. HAVING is typically use转载 2012-12-25 04:21:46 · 965 阅读 · 0 评论 -
How to find duplicate rows with SQL
How to find duplicate rows with SQL This article shows how to find duplicated rows in a database table. This is a very common beginner question. The basic technique is straightforward. I’ll also转载 2013-10-08 01:10:05 · 1361 阅读 · 0 评论 -
insert into table from another table without duplicate
Table src: CREATE TABLE `src` ( `a` int(11) NOT NULL, `b` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL ) Table dest: CREATE TABLE `dest` ( `a` int(11) NOT NULL, `b` int(11) DEFAUL原创 2013-10-08 02:18:52 · 828 阅读 · 0 评论 -
双层 not exist 嵌套
关系模式: 学生(学号,姓名,系别,年龄) 课程(课程号,课程名,学时) 选读(学号,课程号,成绩) 问题:检索选读全部课程的学生姓名 select 学生.姓名 from 学生 where not exists( select * from 课程 where not exists( select * from 选读 where 学号=学生.学号 and 课程号=课程.课程号)转载 2013-04-06 03:27:30 · 3445 阅读 · 0 评论 -
数据表链接
问题: 假如有一个表 ACCOUNT ACCOUNTID, NAME, TYPE A001, JOHN, TUTOR A002, MIKE, TUTOR A003, JIM, STUDENT A004, LILY, STUDENT 另一个表 APPOINTMENT STUDENTID, TUTORID A003, A001 A004, A002 备注:STUD原创 2014-01-19 15:09:38 · 904 阅读 · 0 评论
分享