摘要: rownum的用法 select rownum,empno,ename,job from emp where rownum<6 可以得到小于6的值数据 select rownum,empno,ename,job from emp where rownum>6 and rownum<10 得不到数据 阅读全文
posted @ 2017-07-19 20:30 zmztyas 阅读(271) 评论(0) 推荐(0) 编辑
摘要: --创建表 (包含其中的数据) create table TableName as select * from TableName --插入数据 insert into TableName(列,列。。。) values(‘’,‘’,,,,,) insert into TableName(列,列。。。 阅读全文
posted @ 2017-07-19 15:54 zmztyas 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 统计函数 COUNT():查询表中的数据记录 AVG():求出平均值 SUM():求和 MAX():求出最大值 MIN():Q求出最小值 子查询 【单行多列】 select * from a where (a.id,a.name)=(select b.id,b.name from b where b 阅读全文
posted @ 2017-07-19 15:36 zmztyas 阅读(645) 评论(0) 推荐(0) 编辑
摘要: where 连接 select * from a,b //使用的是笛卡尔乘积 显示 a.count*b.count 条数 select * from a,b where a.id=b.id 其实只是显示的隐藏了笛卡尔乘积,但是乘积并没有消失 且where 关联与 inner join 效果是一致的, 阅读全文
posted @ 2017-07-19 14:00 zmztyas 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 在python是使用bif=built in functions 即内置函数 dir(__builtins__) 可以查看所有的内置函数。注:pycharm中无法使用,不知道原因 help(input) 其中input代码内置函数名,这样可以看到用法和说明 python中使用变量之前必须对其赋值,变 阅读全文
posted @ 2017-07-19 08:46 zmztyas 阅读(125) 评论(0) 推荐(0) 编辑