简体   繁体   English

sql语句检查sqlite3 python中属性值的长度

[英]sql statement to check the length of an attribute value in sqlite3 python

Is there a way to write a query that returns the results according to the length of a specific attribute value in sqlite3 ? 有没有一种方法可以编写查询,该查询根据sqlite3中特定属性值的长度返回结果?

For instance I have table X as : 例如,我的表X为:

id statements id陈述

1 "new-york library" 1个“纽约图书馆”

2 "hudson river" 2“哈德逊河”

... ...

how could we write an sql query for the question: " Get me the statements that have character-length less than 13". 我们如何编写一个SQL查询该问题:“让我得到字符长度小于13的语句”。

select statements 
from X
where length (statements) < 13

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM