DDL:指的是操作数据库、表、字段的相关语句,例如:create、alter、drop DML:指的是对表中的数据进行增删改的操作,例如:insert、update、delete 查询语句书写顺序:select >from >where >group by >having >order by >li ...
分类:
数据库 时间:
2020-04-22 22:50:36
阅读次数:
173
单表查询 单表查询语法: select distinct 字段1,字段2... from 表名 where 条件 group by field having筛选 order by 关键字执行的优先级: 1.找到表:from 2.拿着where指定的约束条件,去文件/表中取出一条条记录 3.将取出的一 ...
分类:
数据库 时间:
2020-04-22 10:22:20
阅读次数:
78
日常联系 group by , order by 和 join, 不断脑补整个过程, 就跟 用Python一样, 灵活多变, 有画面感. ...
分类:
数据库 时间:
2020-04-20 23:32:03
阅读次数:
71
一、模糊查询 like %代表零或任意更多的字符 _代表一个字符。(下划线) eg:查询姓名以w开头的人员。 select * from emp where ename like 'w%' 查询职位以MAN_开头的员工信息。 select * from emp where ename like 'M ...
分类:
数据库 时间:
2020-04-20 16:17:35
阅读次数:
185
Problem : Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary repr ...
分类:
其他好文 时间:
2020-04-20 11:50:44
阅读次数:
65
https://blog.csdn.net/wolfofsiberian/article/details/39346781# 学生表 课程表 分数表 1、检索出选了全部课程的学生姓名: (不存在一门课程没有分数) SELECT student.SNAME from student where not ...
分类:
数据库 时间:
2020-04-14 21:06:53
阅读次数:
208
问 题 Still sometime I'm desperately searching for some community of developers which is dealing with the parsing of incoming email and storing its stru ...
分类:
数据库 时间:
2020-04-14 00:53:46
阅读次数:
105
608.树节点 思路 三种分类点的特性: Root:p_id为空;Inner:既有p_id又是别人的p_id;Leaf:剩下的。 所以代码: 612. 平面上的最近距离 思路: 将两个表自联结,用POWER(,2)算距离,作为dist。甩掉dist=0的行(这里只能用HAVING),而我暂时还不知原 ...
分类:
数据库 时间:
2020-04-13 00:26:15
阅读次数:
85
On another floor of the A.R.C. Markland-N, the young man Simon "Xenon" Jackson, takes a break after finishing his project early (as always). Having a ...
分类:
其他好文 时间:
2020-04-11 18:34:23
阅读次数:
56
case when 来做条件计数 sum(case when xxx then 1 else 0) 和 mysql 可以直接用中文做别名, 同时巩固 join , group by 和 sql 执行顺序等. ...
分类:
数据库 时间:
2020-04-11 18:13:08
阅读次数:
91