1. 登录和登出数据库 登录数据库:mysql -uroot -p # 显示当前时间 select now(); 登出(退出)数据库: quit 或 exit 或 ctrl + d 2. 数据库操作的SQL语句 #1、查看所有数据库 show databases; #2、创建数据库 create d ...
分类:
数据库 时间:
2021-04-16 11:39:17
阅读次数:
0
oracle的写法与sql server不一样,老是只记得sql server的写法,记不住oracle的。 现在专门记录一下。 create table newtablenameas select * from tablename where rownum<0; 上面只复制了结构没有数据,想要有数 ...
分类:
数据库 时间:
2021-04-15 12:46:42
阅读次数:
0
# 1. 选择排序:循环找最小值,依次放在左侧 def select_sort(arr): for i in range(len(arr)-1): min_index = i for j in range(i+1, len(arr)): if arr[j] < arr[min_index]: min ...
分类:
编程语言 时间:
2021-04-15 12:18:58
阅读次数:
0
body, html{ -moz-user-select: none; /*火狐*//*选中文字时避免出现蓝色背景*/ -webkit-user-select: none; /*webkit浏览器*//*选中文字时避免出现蓝色背景*/ -ms-user-select: none; /*IE10*// ...
分类:
Web程序 时间:
2021-04-15 12:13:30
阅读次数:
0
大量的等待事件,系统缓慢,从AWR看DBtime已经满负载了,主要等待事件如下 Enq: KO - Fast Object Checkpoint 占比DBTime的45%。通过ASH查询阻塞关系,等待该事件的用户SQL都被796会话阻塞,而该用户是CKPT进程。 SYS@orcl1>select s ...
分类:
其他好文 时间:
2021-04-14 12:38:41
阅读次数:
0
大量的等待事件,系统缓慢,从AWR看DBtime已经满负载了,主要等待事件如下 Enq: KO - Fast Object Checkpoint 占比DBTime的45%。通过ASH查询阻塞关系,等待该事件的用户SQL都被796会话阻塞,而该用户是CKPT进程。 SYS@orcl1>select s ...
分类:
其他好文 时间:
2021-04-14 12:37:28
阅读次数:
0
测试环境 MySQL版本: 5.7.30 事务级别: READ-COMMITTED 测试数据 mysql> show create table tb1001 \G *************************** 1. row *************************** Table ...
分类:
数据库 时间:
2021-04-14 12:34:40
阅读次数:
0
方法 含义 备注 查询 select distinct name, id from table 对name一列去重 ...
分类:
数据库 时间:
2021-04-14 12:10:14
阅读次数:
0
常用关系数据库分页SQL都是不相同的,不过大同小异。 下面是Oracle分页简单事例图片以及代码: 1、普通查询 select * from table_Name t order by active_count desc; 2、查询第一条记录 select * from (select * from ...
分类:
数据库 时间:
2021-04-13 12:44:12
阅读次数:
0
#创建job_grades表/*CREATE TABLE job_grades(grade_level VARCHAR(3), lowest_sal int, highest_sal int); INSERT INTO job_gradesVALUES ('A', 1000, 2999); INSE ...
分类:
其他好文 时间:
2021-04-13 12:40:20
阅读次数:
0