select a.t_name,a.t_date t_in,a.t_inorout t_out,b.t_date d_out,b.t_inorout t_come
from (select * from table_name where t_inorout='出门') a,
(select * from table2 where t_inorout='回来') b
where a.t_name=b.t_name
其中t_name表示姓名,t_date表示日期,t_inorout表示出去或回来,table_name该表的表名。
from (select * from table_name where t_inorout='出门') a,
(select * from table2 where t_inorout='回来') b
where a.t_name=b.t_name
其中t_name表示姓名,t_date表示日期,t_inorout表示出去或回来,table_name该表的表名。
解决方案 »
- 请教Berkeley DB数据库的使用和开发
- 奇怪的SQL语句 求助(分少请原谅)
- oracle中的sql转成java代码,有工具否,标题要长点
- xquery日期比较以及数值比较问题,紧急,求各路高手相助
- 请教一语句
- 关于null值比较的问题
- [100]这样一个SQL语句的问题,感觉象是智力测验题,谁能给出关键思路就给100分
- 把一个gb2312编码的oracle数据库倒入到utf-8的oracle数据库怎么做
- Oracle常见基本问题初步总结
- 24小时在线求助!!!!,请问怎样在p41.7的机器上,在操作系统是redhat8.o下安装oracle9i
- 各位高手,哪里有关于ORACLE触发器的资料啊!谢谢!!
- 在ORACLE中,怎样用SQL语句返回一个字段名?
from yourtable a,yourtable b
where a.姓名=b.姓名
from yourtable a,yourtable b
where a.姓名=b.姓名
and a.姓名='张三'
select a.t_name,a.t_date,a.t_inorout,b.t_date,b.t_inorout
from table2 a,table2 b
where a.t_name=b.t_name and a.t_inorout='出门' and b.t_inorout='回来'其中t_name表示姓名,t_date表示日期,t_inorout表示出去或回来,table_name该表的表