BETWEEN和LIKE中的问题

时间:2011-08-12 09:37:30

标签: mysql sql database postgresql

如何编辑此查询才能正常工作?

 SELECT * FROM my_table WHERE column1 BETWEEN LIKE '%T'  AND LIKE '%t';

感谢

2 个答案:

答案 0 :(得分:3)

据我所知,你想要这样的东西 -

<强>编辑:

SELECT column1  FROM my_table
WHERE ORD(RIGHT(column1, 1)) >= ORD('T') AND ORD(RIGHT(column1, 1)) <= ORD('t')

答案 1 :(得分:0)

 SELECT * FROM my_table WHERE column1 LIKE '%T%t';