SQL如何计算某列有多少个字符?
我想找出某列的 3-5个字符的 那些行。怎么办?
谢谢
------解决方案--------------------select * from yourTable where len(yourColumn) > 3 and len(yourColumn) <5
------解决方案--------------------select * from # where len(col) between 3 and 5
------解决方案--------------------select 列名=[name]
from syscolumns
where object_name(id)= '表名 ' and length between 3 and 5
------解决方案--------------------想找出某列的 3-5个字符的 那些行
select substring(col,3,3) from tb
------解决方案--------------------select * from # where len(col) between 3 and 5