Learn SQL statements - Select (9): Other

// long as the first five records 
Procedure TForm1.Button1Click (Sender: TObject);
 the begin 
  with ADODataSet1 do  the begin 
    the Close; 
    the CommandText: = 'the SELECT the TOP the FROM. 5 * Country' ; 
    the Open; End ;
 End ; // deduplication Procedure TForm1.Button2Click ( SENDER: TObject);
 the begin with ADODataSet1 do the begin 
    the Close; 
    the CommandText: = 'the DISTINCTROW the SELECT * Country the FROM' ; 
    the Open; End ;
 End ; // Get a list of fields procedure
  



   
  


 TForm1.Button3Click(Sender: TObject);
var
  i: Integer;
  str: string;
begin
  str := '';
  for i := 0 to ADODataSet1.FieldDefs.Count - 1 do
  begin
    str := str + ADODataSet1.FieldDefs[i].Name + sLineBreak;
  end;
  ShowMessage(str);
end;

Guess you like

Origin www.cnblogs.com/jijm123/p/11457726.html