WHERE ( order_amount != null and order_amount != ‘’ and received_amount != null and received_amount != ‘’ ) 查询结果,一条也没有! 在SQL中逻辑表达式的可能值包括TRUE、FALSE和UNKNOWN,它们被称之为三值逻辑。
TINYINT 1个字节 SMALLINT 2个字节 MEDIUMINT 3个字节 INT, INTEGER 4个字节 BIGINT 8个字节 FLOAT(p) 如果0 <= p <= 24为4个字节, 如果25 <= p <= 53为8个字节 FLOAT 4个字节 DOUBLE [PRECISION], item REAL 4个字节 DECIMAL(M,D), NUMERIC(M,D) 变长(0-4个字节) BIT(M) 大约(M+7)/8个字节 https://blog.csdn.net/free_ant/article/details/52936722
//SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES; //SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=’schema’ AND TABLE_NAME=’table’; //SHOW FULL COLUMNS FROM ‘table’; //show create table ‘table’; sqlingo 就是通过SHOW FULL COLUMNS FROM ‘table’; 来获取表结构生成orm的结构体,来保证代码和数据库的一致性的。
https://github.com/go-redis/redismock db, mock := redismock.NewClientMock() mock.ExpectGet(key).RedisNil()