SQLite字符串拼接

前端之家收集整理的这篇文章主要介绍了SQLite字符串拼接前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

用'||'拼接字符串

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

数字相加

SELECT 'A'+'B' 结果为0

SELECT"A"+"1" 结果为1

"A"+1 结果为1

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 to INLogical In ANDLogical And ORLogical Or LIKERelational String matching GLOBRelational Filename matching

原文链接:https://www.f2er.com/sqlite/198972.html

猜你在找的Sqlite相关文章