摘要: 增: insert into (1,2,3) values (a,b,c); 删: delete from student where id=1; 改: update student set name=‘去’,‘sex=男’ where id =1; 查: 多表查询 Select 字段 right、 阅读全文
posted @ 2019-10-08 17:46 传道授业 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 用户: system / sys 1.select * from dba_users; 显示所有用户 1.创建用户: create user A identified by 123456; 2.权限分配:DBA:所有全部resource:可以创建实体,不可以创建数据库connect :可以登录分配权 阅读全文
posted @ 2019-10-08 17:30 传道授业 阅读(3865) 评论(0) 推荐(0) 编辑
摘要: 创建表: create table 表名( 字段名1 数据类型 约束条件, 字段名2 数据类型 约束条件,.。。。字段名n 数据类型 约束条件 ); 表名: 开头必是字母,1--30字符, 字母,数字,下划线,$ ,#字段名1 表名唯一, 关键字不能为表名 插入表记录1. insert into 表 阅读全文
posted @ 2019-10-08 17:29 传道授业 阅读(659) 评论(1) 推荐(0) 编辑
摘要: 十一、多表查询 (有关联) 1. select * from 表名1 别名1, 表名2 别名2 where 连接与查询条件 n个表,条件有n-1个 select * from stu, course; //两两的相积 select * from stu , course where stu.id = 阅读全文
posted @ 2019-10-08 17:23 传道授业 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 八、分组查询select 分组字段1,分组字段2 , 聚合函数() from 表名 group by 分组字段1,分组字段2 having 条件 order by 分组字段/聚合函数; select 分组字段1,分组字段2 , 聚合函数() from 表名 where 条件表达式 group by 阅读全文
posted @ 2019-10-08 17:22 传道授业 阅读(731) 评论(0) 推荐(0) 编辑
摘要: #需要导入的模块 import requests import json import pprint import random import time #请求链接 r = requests.get('https://api.bilibili.com/x/v2/reply?jsonp=jsonp&pn=1&type=1&oid=46445761&sort=0&_=1553736731025') d 阅读全文
posted @ 2019-10-08 16:21 传道授业 阅读(329) 评论(0) 推荐(0) 编辑
摘要: def MyMessage(name,age,where): print( "My name is :" +name.upper()+","+ "this yesr is :" +str(age)+" year old!"+ "come from :"+where+"." ) MyMessage("zhenghanqiao",3000,"guangxi") class Dog(): def __i 阅读全文
posted @ 2019-10-08 16:07 传道授业 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 扑克牌,选一个作为有序区,其他作为无序区,这样好理解一些 阅读全文
posted @ 2019-10-08 12:47 传道授业 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #有个前提:列表数据从小到大排列list =[2,3,5,10,15,16,18,22] min=0 max=len(list) a=22 while minnum: min=mid+1 else: max=mid 阅读全文
posted @ 2019-10-08 11:47 传道授业 阅读(158) 评论(0) 推荐(0) 编辑
摘要: print("multiplication Table") for i in range(1,10): for j in range(1,i+1): print(j,"*",i,"=",i*j,"\t",end='') print(" ") 阅读全文
posted @ 2019-10-08 11:06 传道授业 阅读(171) 评论(0) 推荐(0) 编辑
摘要: list=[1,2,3,4,5,6,3,8,9,0,1,2,5,7,7,7,7] a=7 for i in range(len(list)): if list[i] ==a: print("你要找的数字排"+str(i+1)) #顺序查找 : 从列表的第一个元素开始遍历,知道找到为止。 阅读全文
posted @ 2019-10-08 11:02 传道授业 阅读(229) 评论(0) 推荐(0) 编辑
摘要: list=[1,2,3,4,5,6,3,8,9,0,1,2,5,7,7,7,7] a=7 for i in range(len(list)): if list[i] ==a: print("你要找的数字排"+str(i+1)) #顺序查找 : 从列表的第一个元素开始遍历,知道找到为止。 阅读全文
posted @ 2019-10-08 11:01 传道授业 阅读(137) 评论(0) 推荐(0) 编辑
摘要: arr=[9,2,3,5,1,7,8,6,4,0] for i in range(len(arr)-1):#用i与j相比,所以i少一位 min=i#标志 for j in range(i+1,len(arr)): if arr[min]>arr[j]: min=j if min!=i: arr[i], arr[min] = arr[min], arr[i] pri... 阅读全文
posted @ 2019-10-08 10:49 传道授业 阅读(137) 评论(0) 推荐(0) 编辑
摘要: def fb(n): a,b=0,1 while a<=n: print(a,end=" ", flush=True)#设置flush为true,就是说,如果你的缓冲区的内容很多了,就将数据读出,以免数据泄漏,造成错误。 a,b=b,a+b # python不借助变量交换两数的值 fb(100) 阅读全文
posted @ 2019-10-08 10:07 传道授业 阅读(191) 评论(0) 推荐(0) 编辑