Thinkphp6中where条件中字段与字段比较条件的写法
分类:
Web程序 时间:
2020-11-08 17:10:34
阅读次数:
22
原因:出现这个问题是因为sql语句中使用除法,但除数存在为0的情况下导致的,如下图: 解决办法: --使用case when 排除为0的情况 (CASE WHEN T1.CALC_WEIGHT > 0 THEN NVL(T1.FIRST_TRANSFER_FEE / T1.CALC_WEIGHT, ...
分类:
其他好文 时间:
2020-11-08 17:03:17
阅读次数:
21
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-0.htmlMySQL8.0.0The current maximum auto-increment counter value is now written to the redo l ...
分类:
数据库 时间:
2020-11-08 16:51:42
阅读次数:
24
wmic datafile /?动词有ASSOC,CALL,CREATE,DELETE,GET,LIST 这几个 命令:wmic datafile where "filename='dsc04059' and extension='jpg' and drive='f:'" list /format: ...
分类:
其他好文 时间:
2020-11-07 15:59:22
阅读次数:
24
02-myBatisPlus的wrapper接口的使用。 1.直接先上硬菜 序号函数名说明说明/例子1eq等于=eq("name","二狗子") ==> where name = '二狗子'2ne不等于 <>ne("name","二狗子") ==> where name <> '二狗子'3gt大于 ...
分类:
移动开发 时间:
2020-11-06 02:53:42
阅读次数:
54
1.关于主表和从表怎么选择的问题 select * from table, from后边的是主表,join 后边的是从表 常见的是取的字段多的表是主表,但不是常见的不一定每次都是对的。 还要看后边where 是用那张表的字段去做过滤, select a.id as menuId, a.name, a ...
分类:
数据库 时间:
2020-11-06 01:55:56
阅读次数:
23
1、避免出现select * from table语句,要明确查出的字段 2、在SQL语句中,如果一个where条件过滤的数据库记录越多,定位越准确,则该where条件越应该前移 3、查询时尽可能使用索引覆盖,即对select的字段建立复合索引,这时查询时只进行索引扫描,不读取数据块 4、应绝对避免 ...
分类:
数据库 时间:
2020-11-06 01:14:14
阅读次数:
22
switch语句改为多态结构更好些。 1. 常规switch #include <iostream> enum EnumType { enumOne, enumTwo, enumThree }; void showMessage(int type) { switch (type) { case en ...
分类:
编程语言 时间:
2020-11-04 19:20:04
阅读次数:
35
1.基本操作指令1、查看当前系统数据库#mysql-uroot-pmysql>showdatabases;+--------------------+|Database+--------------------+|information_schema|mysql|performance_schema|erp+--------------------+3rowsinset(0.00sec)2、
分类:
数据库 时间:
2020-11-04 18:39:28
阅读次数:
34
https://blog.csdn.net/wqzbxh/article/details/84649485 SELECT concat(host,uri),ua FROM httpdataco WHERE uri LIKE '%BaiduApp_signed%'; 要点是concat这个函数实现拼接 ...
分类:
数据库 时间:
2020-11-04 18:04:06
阅读次数:
39