解决方案 »
- 求教数据库设计问题 ?
- 发现以system.开头的表都不存在了。。。
- oracle 中 NLS_LANG变量如何设置
- 又一个查询的问题
- 请问svrmgrl是什么程序?WINDOWS2000好象没带这个程序呀?
- sql plus 中,修改上次错误的查询用什么命令?
- 什么工具开发PL/SQL最好
- 怎么下这样的sql,select sum(qty) from table1 where name='lile' group by name 当没有lile这条纪录时自动返回 sum(qty) =0 ,
- 只有SYSAUX01.DBF、TEMP01.DBF、USERS01.DBF、EXAMPLE01.DBF能恢复数据库吗
- oracle select coount(*) 读僵死了
- 求助关于oracle的sequences
- 对表进行在线重定义的几个疑问
表别名都放在字段前面,而不能放在函数前边
from tbl_xstj x ,
(select substrb(room_no),1,2) a ,count(p_key) b
from tbl_xstj
where endtime is null and begintime is not null
group by a) t
where x.substrb(room_no,1,2) = t.substrb(room_no,1,2)
group by x.substrb(room_no,1,2);
这样试试呢,