精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● Delphi>>数据库技术>>Re:再问一次sql语句查询

主题:Re:再问一次sql语句查询
发信人: jiajie()
整理人: soaringbird(2001-11-01 10:10:17), 站内信件
【 在 john_ro 的大作中提到:】
:有一个表:  
:txn  
:号码   时间        金额  
:num    time        txnamt  
:8      20         100.00  
:

select num, min(time) time into #temptable
from txn 
group by num

select txn.num, txn.time, txn.txnamt
from txn, #temptable
where txn.num=#temptable.num and
      txn.time=#temptable.time

drop table #temptable 

[关闭][返回]