1.在SQL的查询器里执行的话,可这样写:
declare @mc1 int,@mc2 int
select @mc1=c1,@mc2=c2 from table1 where c0='12'
2.在DELPHI中:
var
mc1,mc2:integer;
begin
Query1->Close();
Query1->SQL->Clear();
Query1->SQL->Add('select c1,c2 from table1 where c0='12'');
Query1->Open();
mc1:=Query1.FieldByName('c1').asinteger;
mc2:=Query1.FieldByName('c2').asinteger;
end;