上一页 1 ··· 8 9 10 11 12
摘要: -- 替换匹配到的字符串-- replaceOne(haystack, pattern, replacement) -- 用‘replacement’子串替换‘haystack’中与‘pattern’子串第一个匹配的匹配项(如果存在)。 ‘pattern’和‘replacement’必须是常量。 - 阅读全文
posted @ 2022-01-18 13:38 渐逝的星光 阅读(2095) 评论(0) 推荐(0) 编辑
摘要: -- pasition(haystack, needle), 显示needle在haystack的第一个出现的位置。 SELECT POSITION('2121stringstrstrstrstr','str') AS positionSearch, -- 5 POSITION('你好,hello, 阅读全文
posted @ 2022-01-18 13:37 渐逝的星光 阅读(4177) 评论(0) 推荐(0) 编辑
摘要: -- 1.字符串长度 SELECT length('hello world') as str_length, -- 按照Unicode编码计算长度“你好”的长度为6 empty('hello world'),-- 判断字符串是否为空,空为1,非空为0 notEmpty('hello world'), 阅读全文
posted @ 2022-01-18 13:33 渐逝的星光 阅读(4715) 评论(0) 推荐(0) 编辑
摘要: 常用方式: SELECT toDateTime('2019-07-30 10:10:10') AS time, -- 将DateTime转换成Unix时间戳 toUnixTimestamp(time) as unixTimestamp, -- 保留 时-分-秒 toDate(time) as dat 阅读全文
posted @ 2022-01-18 11:58 渐逝的星光 阅读(1588) 评论(0) 推荐(0) 编辑
摘要: 类型转换函数部分示例: SELECT toInt8(12.3334343), toFloat32(10.001), toFloat64(1.000040); SELECT toString(now()); SELECT now() AS now_local, toString(now(), 'Asi 阅读全文
posted @ 2022-01-18 11:54 渐逝的星光 阅读(3237) 评论(0) 推荐(0) 编辑
摘要: -->>>>>> 比较函数(始终返回0表示false 或 1表示true) SELECT 12 == 12, 12 != 10, 12 == 132, 12 != 12, 12 <> 12; SELECT equals(12, 12), notEquals(12, 10), equals(12, 1 阅读全文
posted @ 2022-01-18 11:53 渐逝的星光 阅读(513) 评论(0) 推荐(0) 编辑
摘要: -->>>>>> 逻辑操作符(返回0表示false 或 1表示true) SELECT 12==12 or 12!=10; SELECT 12==12 and 12!=10; SELECT not 12, not 0; SELECT or(equals(12, 12), notEquals(12, 阅读全文
posted @ 2022-01-18 11:53 渐逝的星光 阅读(91) 评论(0) 推荐(0) 编辑
摘要: --求和 SELECT plus(12, 21), plus(10, -10), plus(-10, -10); --差值 SELECT minus(10, 5), minus(10, -10),minus(-10, -10); --积 SELECT multiply(12, 2), multipl 阅读全文
posted @ 2022-01-18 11:52 渐逝的星光 阅读(434) 评论(0) 推荐(0) 编辑
摘要: SELECT toTypeName(0);-- UInt8(三位数为8) SELECT toTypeName(-0);-- Int8 SELECT toTypeName(-343);-- Int16 SELECT toTypeName(12.43); -- Float64(默认浮点型的数据为64), 阅读全文
posted @ 2022-01-18 11:51 渐逝的星光 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1. 对返回的行无任何限定条件,即没有where 子句。 2. 未对数据表与任何索引主列相对应的行限定条件: 例如:在City-State-Zip列创建了三列复合索引,那么仅对State列限定条件不能使用这个索引,因为State不是索引的主列。 3. 对索引的主列有限定条件,但是在条件表达式里使用以 阅读全文
posted @ 2022-01-18 10:59 渐逝的星光 阅读(1497) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12