SELECT * FROM TABLENAME WHERE RQ BETWEEN '2007-7-4' AND '2007-8-10'数据库中RQ列是VARCHAR(10),格式是'YYYY-M-D'用这个查找不出 2007-7-4至2007-7-31的数据是为什么呢?
来源:学生作业学帮网 编辑:学帮网 时间:2024/06/06 00:12:07
SELECT * FROM TABLENAME WHERE RQ BETWEEN '2007-7-4' AND '2007-8-10'
数据库中RQ列是VARCHAR(10),格式是'YYYY-M-D'
用这个查找不出 2007-7-4至2007-7-31的数据是为什么呢?
因为是文本2007-7-4 大于2007-7-31;所以2007-7-10到2007-7-31应该是查不出来的,
其排序为:2007-7-10
2007-7-11
2007-7-12
2007-7-13
2007-7-14
2007-7-15
2007-7-16
2007-7-17
2007-7-18
2007-7-19
2007-7-20
2007-7-21
2007-7-22
2007-7-23
2007-7-24
2007-7-25
2007-7-26
2007-7-27
2007-7-28
2007-7-29
2007-7-30
2007-7-31
2007-7-4
2007-7-5
2007-7-6
2007-7-7
2007-7-8
2007-7-9
2007-8-1
2007-8-2
2007-8-3
2007-8-4
2007-8-5
2007-8-6
select * from book limit ,
select * from a union select * from b 能详细说下么
select from 表 和select from [表]有什么不同?
select count(*) from 怎么使用
select count(1) from emp
select * into dept2 from dept
1' union select * from [ADM] union select *
请问 select top 1 1 from ...
// IF EXISTS (SELECT name FROM m
select * into b from a where 11
SQL 语句 SELECT * FROM {{table}} WHERE `fleet_end_time`
SELECT
ms sql :select * from (select *from b) as xxx where 和 select * from (select *from b) xxx where区select * from (select *from b) as xxx where…… 和 select * from (select *from b) xxx where……的区别别告诉我是一样的.因为我有一
select max(account_id ) from(select top 5 account_id from account)子查询没起作用为什么?
select * from user_info where user_name in (select user_name from user)怎么改写提高效率谢谢了.
select * from (select a.*,rownum aa from table a ) where aa=10
数据库中select into from 和 insert into select的区别
请问sql=select * from 招聘信息 order by id