摘要: Join的写法 (1) inner join(内连接) Select a.name,b.program from student a inner join program b on a.stuid=b.stuid (2) JOIN: 如果表中有至少一个匹配,则返回行=inner join (3) L 阅读全文
posted @ 2019-01-17 16:22 流离32位 阅读(103) 评论(0) 推荐(0)
摘要: (1) SQL Server between and是包括边界值的,not between不包括边界值,不过如果使用between and 限定日期需要注意,如果and后的日期是到天的,那么默认为00:00:00 例如:and 后的日期为2017年04月06日,就等价于2017-04-06 00:0 阅读全文
posted @ 2019-01-17 16:21 流离32位 阅读(772) 评论(0) 推荐(0)
摘要: (1) ‘_’代表一个字符 Select * from student where name like’_my%’ 查找name中第二第三个字符为my的数据 (2) ‘[]’代表包含 Select * from student where name like’[ACD]%’ 查找name中以A/C/ 阅读全文
posted @ 2019-01-17 16:20 流离32位 阅读(129) 评论(0) 推荐(0)
摘要: 不同数据库有不同的函数进行取值 (1) SQL SERVER TOP函数 Select top(10) from student; 取student表10行数据 Select top 10 precent from student; 取student 表10%的数据 (2) ORACLE rownu 阅读全文
posted @ 2019-01-17 16:19 流离32位 阅读(1392) 评论(0) 推荐(0)