这样的sql语句怎写?(10分)

  • 主题发起人 主题发起人 okzjq
  • 开始时间 开始时间
O

okzjq

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样用SQL语句实现查询某个字期字段等于一个字符串,即
select * from table where time=???
后面怎写?time为日期类型

我用select * from table where time=2002-12-24
和select * from table where time='2002-12-24'
都不行哟,请帮忙!!
 
用的什么数据库
 
Access+delphi
 
select * from table where time="#2002-12-24#"
是不是得这样很长时间不用ACCESS了
你可查一下帮助吧
 
time字段与DBDateTimeEditEh相联,在添加记录时是由它直接写去的!!!
现在要利用dbDatetimeEditEh.text来查Access表中与该值相等的数据
 
select * from table where time=#2002-12-24#
或者是这样,你两个都试试吧
记得肯定可用SELECT语句查寻日期字段的
 
太感激了,这句语句我弄了一个晚上没办法写,你一下子就解决了我的难题!!!
真是太好了!!!
 
后退
顶部