function GetSelectTable(Dataset: TTable): TStrings;
var
i: Integer;
str: string;
begin
Result := TStringList.Create;
Result.Add('SELECT');
try
for i := 0 to DataSet.FieldCount-1 do
begin
if i = 0 then
str := 'SELECT'
else
str := ',';
str := str + ' ' + DataSet.Fields[i].FieldName;
Result.Add(str);
end;
Result.Add('FROM ' + DataSet.TableName)
except
Result.Free;
Result := nil;
end;
end;
Not: Order By, Grup By deyimlerini de kendiniz ekleyebilirsiniz.