1.select num,date,nam
from a,b
where a.id=b.id 2.select num,date,''
from a,b
where a.id is null我是这样合并的
select num,date,nam
from a,b
where a.id=b.id or a.id is null 但这样合并后a.id为空的数据中 nam字段自动补了b表中所有的nam。应该怎么处理这个语句,谢谢指点!
from a,b
where a.id=b.id 2.select num,date,''
from a,b
where a.id is null我是这样合并的
select num,date,nam
from a,b
where a.id=b.id or a.id is null 但这样合并后a.id为空的数据中 nam字段自动补了b表中所有的nam。应该怎么处理这个语句,谢谢指点!
解决方案 »
- 关于行序号的问题
- 高手帮忙!删除数据库为什么不删除对应的数据文件啊(mdf,ldf)??
- 为什么左连接,写法不同,返回结果也不同
- qt+sql2000的系统,如何在其他机器上运行??
- 为什么更改sqlserver数据库表中的记录会提示“在流水模式下,事务无法启动”?
- 急 高手进 IMAGE字段追加数据
- 不知道这个问题简单还是复杂,请各位都看看.
- BINB,binb 你好!请问atoi是什么函数?
- 在SQL SEVER 2000中怎么写TRANSACT-SQL 语句来创建表与表之间的关系???
- sql不能访问网络路径,但是在windows下可以
- 简单的横向显示,就是着急
- 请问查询发送SQL指令的用户?
from a,b
where a.id=b.id
union all
select num,date,''
from a,b
where a.id is null
from a right join b
on a.id=b.id
from a,b
where a.id=b.id
union all
select num,date,''
from a,b
where a.id is null
from a,b
where a.id=b.id
union all
select num,date,''
from a,b
where a.id is null