Two tables:
表A:
numberA
----------------
123
321
456
241
233表B:
numberB
----------------
123
233
241我的问题是,如何在一个表中算出totalnumbers of A(是5)和 表A-表B (是2),还要 Label the columns ‘A' and ‘A-B’ respectively.You can not use a solution like
select (count(numberA)-3) from A
You need to use a the solution like
select (count(numberA)-count(numberB)) -----> not correctMy question is how to combine the two values in one table and label the columns ‘A' and ‘A-B’ respectively
表A:
numberA
----------------
123
321
456
241
233表B:
numberB
----------------
123
233
241我的问题是,如何在一个表中算出totalnumbers of A(是5)和 表A-表B (是2),还要 Label the columns ‘A' and ‘A-B’ respectively.You can not use a solution like
select (count(numberA)-3) from A
You need to use a the solution like
select (count(numberA)-count(numberB)) -----> not correctMy question is how to combine the two values in one table and label the columns ‘A' and ‘A-B’ respectively
解决方案 »
- 通过编程能操作另一台电脑上的Oracle数据库吧,用Pro*C/C++就可以吧?
- 关于oracle8i 客户端连接 oracle 9i的出错 ORA-03113
- 请教一个sql问题!
- 请问在建oracle用户时,start-up program是选择/usr/bin/sh 还是/sbin/sh
- 简单问题
- Oracle中升星,oracle版与SQL Server版各散100分
- 如何全备份一个oracle 数据 库
- 如果指定查询语句的索引
- 如何在oracle中使用begin end来运行select
- Oracle存储过程中EXECUTE IMMEDIATE 执行结果是空时怎么继续执行?
- (急!!!)SQL*PLUS中漢字顯示為亂碼,我知道是字符集的問題,求教如何設置字符集
- 数据库关闭后,不能正常启动,请教什么原因???
select a.A, (a.A - b.B) "A-B"
from (select count(*) A from numberA) a,
(select count(*) B from numberB) b;
from (select count(*) A from numberA) a,
(select count(*) B from numberB) b;