请教一SQL查询语句 请先回答nononono(null,null)的问题, 然后说明你用的什么数据库. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ‘第一条记录’指最早插入表的那条吗?假设有主键ID可以这样: select a.房间号,a.预定时间,a.退房时间,a.结帐金额 from table a,(select 房间号,min(id) as id from table group by 房间号) b where a.id=b.id order by a.房间号 就是lj_lt的意思,最早插入的那条记录但现在就是没有主键ID:( select 房間号,預定时間,退房时間,結帳金額 from TableName a,(select 房間号 homeno,min(預定时間) mintime from TableNamegroup by 房間号) bwhere 房間号 = homeno and 預定时間 = mintime; 哇,zhuzhichao(竹之草)好棒:) 额,中招了,错误:1222:已超过了锁请求超时时段 高手进来 sql500之查询系列:合并 请各位高手指点一下我的SQL存储过程,谢谢啦.... 怎么返回存储过程的操作提示 sql表的合并 BCP 导出不响应 我的sql的一点问题,哪位大位过来看看,谢谢,急急!1 请教IIF的用法 谁能帮我解决这个问题导出问题?急!!! Bulk Insert怎样用于这样的文本!!! 斑竹和高手请进:一个紧急的问题
select a.房间号,a.预定时间,a.退房时间,a.结帐金额 from table a,(select 房间号,min(id) as id from table group by 房间号) b where a.id=b.id order by a.房间号
但现在就是没有主键ID:(
from TableName a,
(select 房間号 homeno,min(預定时間) mintime from TableName
group by 房間号) b
where 房間号 = homeno and 預定时間 = mintime;