select dhhm,
(select jc from table1 where dm=table2.type1),
(select jc from table1 where dm=table2.type2)
from table2
(select jc from table1 where dm=table2.type1),
(select jc from table1 where dm=table2.type2)
from table2
解决方案 »
- 数据库好难啊 。。。。。。。。。。。。。。。。
- 一个可以为空的字段问题
- 请问在两张表里(A1、B1)删除A1中的达到B1中条件的记录,该怎么去写命令?在线急用~~谢谢了~!
- 存储过程问题‘从字符串转换为 datetime 时发生语法错误’
- 急求助!!!可能发生了架构损坏。请运行 DBCC CHECKCATALOG。
- 如何合并各数据行的varchar字段值?
- 我想定期清除数据请问应该怎么办?
- 关于考勤系统的终极讨论,希望大家踊跃讨论。等待up~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 在vb.net中,一旦数据库中某个值改变,怎样通过前端程序通知用户?
- 挑战高手,不怕难的就进来,谁正确我给分
- SQL 分组 取前3个的问题
- 比较特殊的统计每天的商品销售量总和.
select table2.dhhm,b.jc,c.jc from table2,
(
select table2.dhhm,table1.jc
from table1,table2
where table1.dm=table2.type1) b,(select table2.dhhm,table1.jc
from table2,table1
where table1.dm=table2.type2) c
where table2.dhhm=b.dhhm and table2.dhhm=c.dhhm