在写一个比较两个access数据库差异的软件,就差记录的比较了,数据库的路径放在了两个Edit中,各自拥有的表显示在了两个Combobox中,用的是ado的动态链接,所以数据库都是可变的,这样用adoquery的sql查询的话就不知道每次有哪些字段是相等的,
就不好查询啊
如:
Select * from table1 as t1
where Exists(
Select * from Table2 in '库2.MDB' as t2 where t1.f1=t2.f1
上述过程中的t1.f1=t2.f1 就不知道f1是哪些具体的字段啊,因为数据库和表都是可选的,不是固定的,有没有通用的方法可以解决啊!
请教!
就不好查询啊
如:
Select * from table1 as t1
where Exists(
Select * from Table2 in '库2.MDB' as t2 where t1.f1=t2.f1
上述过程中的t1.f1=t2.f1 就不知道f1是哪些具体的字段啊,因为数据库和表都是可选的,不是固定的,有没有通用的方法可以解决啊!
请教!
请教!谢谢
谢谢
(select * from 学生表 in D:\1\教学2.mdb as t2 where
t1.学号=t2.学号 and
t1.姓名=t2.姓名 and
t1.性别=t2.性别 and
t1.年龄=t2.年龄)' 中。完整的查询表达式为:
select * from 学生表 as t1
where exists
(select * from 学生表 in D:\1\教学2.mdb as t2 where
t1.学号=t2.学号 and
t1.姓名=t2.姓名 and
t1.性别=t2.性别 and
t1.年龄=t2.年龄)大家看看哪语法错了
谢谢