interbase 问题

wangcs 2003-01-19 02:41:59
有两个数据库 data1,data2,两个数据库中都有结构相同的一个表table1,
我想找出在data1的table1存在而在data2的table1不存在的记录如何实现?

在线等待。。。
...全文
29 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hwh215 2003-02-18
  • 打赏
  • 举报
回复
用Delphi的TBatchMove控件就很容易实现了
hamzsy 2003-02-17
  • 打赏
  • 举报
回复
IB中不可以这样做,具体的在另一帖子回答了
wjlsmail 2003-01-19
  • 打赏
  • 举报
回复
Sql Server 2000 :

select * from Data1.dbo.Table1 where Id not in (select Id from Data2.dbo.Table1)

InterBase 下这句怎么写 ?
Billy_Chen28 2003-01-19
  • 打赏
  • 举报
回复
方法已经在这里了
select * from talbe2 where id not in (select id from table1)
Billy_Chen28 2003-01-19
  • 打赏
  • 举报
回复
以id为例, id相同就表两记录相同:

select * into #tmptable from table1
insert into #tmptable
select * from talbe2 where id not in (select id from #tmptable)
select * from #tmptable

drop table #tmptable

2,209

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 其他数据库
社区管理员
  • 其他数据库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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