sql server中的BEETWEEN子句 [英] BEETWEEN clause in sql server
本文介绍了sql server中的BEETWEEN子句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在sql server中使用BETWEEN作为具有varchar数据类型的列?请帮助...
i想要选择行之间的行,其中列的值为Hello,而另一行对于同一列具有值lol的行..
how to i use BETWEEN in sql server for the column with varchar datatype?please help...
i want to select the rows between the row which has column saysomething with value "Hello" and another row which has value "lol" for the same column..
推荐答案
BETWEEN的使用方式与日期相同。
例如:
BETWEEN is used the same way as for dates.
For example:
SELECT *
FROM Users
WHERE FirstName BETWEEN 'Bill' AND 'Jimmy'
您的整理数据库将影响字符的比较方式。
The collation of your database will affect how characters are compared.
这篇关于sql server中的BEETWEEN子句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文