这样的查询语句怎样写?
表中字段:code 字符串,
现有数据 P20070500001 到P20070500100
查询条件:起始编号和结束编号
如果用 500001 到 500050,进行查询出 P20070500001 到 P20070500050 所有编号的数据,查询语句如何写?
------解决方案--------------------select * from [Table] where right(code,6) between '500001 ' and '500050 '
------解决方案--------------------select * from 表 where right(code,6) between '500001 ' and '500050 '
------解决方案--------------------select * from tb where right(code,6) between '500001 ' and '500050 '