- 博客(14)
- 收藏
- 关注
原创 索引的创建,删除
索引的创建,删除1.创建索引方式一:create方式create [unique ---唯一索引 | fulltext ---全文索引 ] index index_name on table_name ---不指定,默认为普通索引 (column1[(length)[des|Asc]]) --可以对多列建立组合索引 案例--- 表:examination_info,列:duration,exam_id。 普通索引:create IN
2022-05-19 15:46:20
273
原创 表的创建,修改,删除
表的创建,修改,删除1.创建表直接创建表create table[if not exitst] tb_name ---不存在才创建(col date_type ---列名和类型(必选) [ 可选约束 primary key |foreign key |auto_increment |comment comment_value ---列注释 |default default_value ---默认值
2022-05-19 14:24:33
260
原创 Mysql中insert方法汇总
普通插入插入一条数据方式一:对表mytable插入一条**部分**数据时insert into mytable(col1,col2)values(val1,val2);方式二:对表mytable插入一条**完整的**数据时insert into mytable values(val1,val2,val3,...);插入多条数据方式一:对表mytable插入多条**部分**数据时insert into mytable(col1,col2)values(val1,val2).
2022-05-18 15:58:03
555
原创 Mysql字符拼接函数总结
Mysql字符拼接函数总结1.Concat()函数concat(str1,str2,str3,…):作用是把str1,str2,str3等字符串无缝拼接起来。无缝连接如果有任何一个参数为Null,返回结果为null。2.Concat_ws()函数concat_ws(separator,str1,str2,str3…):作用是把str1,str2,str3等字符串以特殊字符separator拼接起来。separator可以是字符串,也可以是其他参数。如果分隔符为null
2022-05-12 15:17:32
1183
原创 正则表达式
正则表达式正则表达式是描述一种字符串匹配的模式,可以用来检查一个串是否含有某种子串,由普通字符和特殊字符组成。1.普通字符普通字符:包含所有的大写,小写,所有数字,所有标点和一些其他字符。[ABC] :匹配集合中的ABC所有字符。[^ABC]: 匹配除了集合中的ABC所有字符。[A-Z] :表示一个区间,匹配所有的大写字母。‘.‘:匹配除了换行符(/n,/r)之外的所有字符,相当于[^\r\n]。[\s\S]:匹配所有。/s:匹配所有空白符,包括换行;/S:非空白符。[\w]:匹配字母,
2022-05-10 15:13:19
102
原创 字节流和字符流标准格式
字节流:可以处理文字,图片,视频格式。public static void main(String[] args){ FileInputStream fis=null; FileOutputStream fos=null; try { fis=new FileInputStream("E:\\000file\\read.txt"); fos=new FileOutputStream("E:\\000file\\write.txt",true); .
2022-04-26 22:46:40
289
原创 rank(),dense_rank(),row_number()函数的调用以及实现
数据以力扣第178题为例1. row_number()的调用与实现连续排名,例如薪水3000、2000、2000、1000排名结果为1-2-3-4,体现同薪不同名,排名类似于编号。row_number()函数的调用select score,row_number() over (order by score desc) as 'rank'from Scores;row_number()的实现select s1.score , @row_num:=@row_num+1 as 'rank'
2022-04-24 14:33:38
420
原创 Integer类型转int类型
Integer类型转int类型Integer[] 转 int[]:使用java8的Stream函数Integer[] integerNum=new Integer[]{1,2,3,4};Arrays.stream(integerNum).mapToInt(Integer::valueOf).toArray;Integer转intInteger A=new Integer(8);int a=A.intValue();int 转Integerint a=new int(8);I
2022-04-20 18:10:16
10879
1
原创 Map实现Comparator的升序逆序
Map实现Comparator的升序逆序方法一:接口内放置比较器对key进行逆序排列Map<Integer,Integer> map = new TreeMap<Integer,Integer>( new Comparator<Integer>() { @Override public int compare(Integer o1, Integer o2) { return o2-o1; //逆序排序 //
2022-04-20 14:16:23
464
原创 【无标题】
windows常用的dos命令查看目录:dir清屏:cls退出终端:exit打开应用计算器:calc图画工具:mspaint记事本:notepadping命令ping www.baidu.com文件操作创建目录:md 目录名删除目录:rd 目录名创建文件:cd>文件名删除文件:del 文件名关闭窗口:alt+F4...
2021-11-25 13:09:21
158
原创 Typora的快捷键
Typora的快捷键标题一级标题:#+space键二级标题:##+space键…字体加粗:(左右分别添加**)斜体:(左右分别添加*)下划线:(左右分别添加<u>)删除线:(左右分别添加~~)引用格式:>+space键代码块格式:```+语言类型图片格式:超链接格式:[路径]()www.baidu.com序列有序格式:1.+space键AB无序格式:-(减号)+space键AB分隔符格式:--
2021-11-25 12:46:03
75
原创 2021-10-24
mysql:SELECT list is not in GROUP BY clause and contains nonaggregated columnset global sql_mode=‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’;set session sql_mode=‘STRICT_TRANS_
2021-10-24 12:58:04
65
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人