加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

sqlite字符串拼接

发布时间:2020-12-13 00:22:28 所属栏目:百科 来源:网络整理
导读:select path||'%' from t_category where depth = 0 and type = 0 用'||'拼接字符串 比如path是/1001/的话 那结果就是/1001/% 数字相加 SELECT 'A'+'B' 结果为0 select "A"+"1" 结果为1 select "A"+1 结果为1 select 2+1 结果为3 =在“+”运算中,SQLite将字

select path||'%' from t_category where depth = 0 and type = 0

用'||'拼接字符串

比如path是/1001/的话 那结果就是/1001/%

数字相加

SELECT 'A'+'B'
结果为0
select "A"+"1" 结果为1
select "A"+1 结果为1
select 2+1 结果为3

=在“+”运算中,SQLite将字符串非数字串都当作0处理了

|| String Concatenation* Arithmetic Multiply/ Arithmetic Divide% Arithmetic Modulus+ Arithmetic Add– Arithmetic Subtract<< Bitwise Right shift>> Bitwise Left shift& Logical And| Logical Or< Relational Less than<= Relational Less than or equal to> Relational Greater than>= Relational Greater than or equal to= Relational Equal to== Relational Equal to<> Relational Not equal to!= Relational Not equal toIN Logical InAND Logical AndOR Logical OrLIKE Relational String matchingGLOB Relational Filename matching

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读