摘要: 1. 排序 使用 order by 进行排序: ASC(ascend)升序,DESC(descend)降序,一般把order by语句放在select语句的结尾,多列排序的顺序按照order by后的字段顺 序进行 使用order by 进行排序的时候可以使用字段的别名进行排序(where 进行条件 阅读全文
posted @ 2022-08-21 11:06 令狐· 阅读(92) 评论(0) 推荐(0)
摘要: 1. 算数运算符 2. 比较运算符 安全等于运算符<=>可以用来对NULL进行判断,左右两值均为NULL则结果为1 3. 非符号运算符(关键字运算符) IS NULL 判断值,字符串或表达式是否为空 IS NOT NULL 判断值,字符串或表达式是否不为空 LEAST 在多个值中返回最小值 GREA 阅读全文
posted @ 2022-08-21 10:09 令狐· 阅读(53) 评论(0) 推荐(0)
摘要: 1. 去重:select DISTINCT name from table; 2. 空值(NULL)参与运算 查询时会导致查询结果为NULL,可以在该字段加入 IFNULL(name, need_value) 来进行一个条件判断。 3. 着重号:如果查询语句中定义的关键字与sql关键字冲突可以加 ` 阅读全文
posted @ 2022-08-14 13:49 令狐· 阅读(34) 评论(0) 推荐(0)
摘要: 直编译生成可执行文件:gcc test.c -o test 预处理:gcc -E test.c -o test.i 编译为汇编代码:gcc -S test.i -o test.s 汇编:gcc -c test.s -o test.o 链接:gcc test.o -o test 多文件编译: gcc 阅读全文
posted @ 2022-07-29 14:14 令狐· 阅读(112) 评论(0) 推荐(0)
摘要: Type of string is binary-safe, which the value of string in redis can inlcude any typical data,such as image with jpg format, serialized object and so 阅读全文
posted @ 2022-06-13 19:43 令狐· 阅读(33) 评论(0) 推荐(0)