with adoquery1 do
begin
close;
sql.clear;
Sql.Add(' Select A.Class1 As 分类1,A.Class2 As 分类2, '+
' A.Class3 As 分类3,B.Title As 标题,B.KeyWord As 关键词,B.Provenance As 出处,'+
' B.Code,B.Remark As 备注,B.InterfixFile As 相关文件,'+
' B.RecordTime As 录入时间,B.LastModifyTime As 最后修改时间'+
' From SourceClass A,SourceMain B Where '+
' A.ID=B.ID And '+
' B.ID='+IntToStr(Data.QueryTemp1.FieldByName('ID').AsInteger)+' And '+
' B.Title="'+Data.QueryTemp1.FieldByName('Title').AsString+'" ');
Open;
end;
其中,A为表1,B为表2
关键语句
select 表1.字段1 as 中文字段1,表2.字段2 as 中文字段2 from 库名 where 条件