各位大哥小弟查询问题

my202com4 2004-09-22 01:23:41
请问如何在一个表中查询一条记录的同时将这条记录在其他表中的相关记录同样显示出来.由于小弟是初学请把程序段加上注释好吗
小弟在此谢谢各位大哥
...全文
116 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
wdwd05 2004-09-22
  • 打赏
  • 举报
回复
select * from table1 a inner join table2 b on a.id=b.id where 条件

或者

select * from table1 a,table2 b where a.id=b.id and 条件

不同的地方不同的使用

jam021 2004-09-22
  • 打赏
  • 举报
回复
学习中,顶!
ryuginka 2004-09-22
  • 打赏
  • 举报
回复
up
mazekui 2004-09-22
  • 打赏
  • 举报
回复
sql server:
select * from table1 a inner join table2 b on a.id=b.id where 条件
oracle
select * from table1 a,table2 b where a.id=b.id and 条件
饮水需思源 2004-09-22
  • 打赏
  • 举报
回复
'假设表sale中的ccuscode与customer表中的ccuscode对应(即客户编号对应):
select * from sale as a,customer as b where a.ccuscode=b.ccuscode
zichen66 2004-09-22
  • 打赏
  • 举报
回复
在VB6里面就要定義兩個RecordSet對象,一個用于顯示主表,一個用于顯示子表,當你在主表中導行時,就調用相應的子表內容

1,217

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧