【转】ACCESS中如何在SQL语句的WHERE条件中加日期条件
转自
http://topic.csdn.net/t/20050110/09/3711952.html
access中时间要用#,不是双引号
select * from kc where rq < #2000-01-01# and rq>#2002-01-01#
不要用between,它的效率泰低
使用# 而不是使用单引号
相关文档:
The following tables describe certain SQL
limits. Adhering to the most restrictive case can help the programmer
design application programs that are easily portable.
Table 7. Identifier Length Limits
Description
Limit in Bytes
Longest authorization
name (can only be single-byte characters) ......
1.SQL并行查询
alter session enable parallel dml execute immediate 'alter session enable parallel dml'; --修改会话并行DML select /*+parallel(a,4)*/ * from table_name a select /*+parallel(a,8)*/ * from table_name a &nbs ......
create table tabReProc
(
name varchar(30),
age integer,
primary key(name,age)
)
insert into tabReProc values('x7700',20)
insert into tabR ......
昨晚在做Access数据库开发时遇到一个简单的模糊查询问题,在access2007里面可以查出来,但用C#2.0查询就是查不出来。
后来试出来了,原来 是jet语法的问题:
在Access中,模糊查询用 * 号,如 select * from T_PO where po_NO like '*8*'
但在C#程序里面写的时候要用 % 号,即 select * from T_PO where po_NO like '%8% ......