Title: Easy create table via SQL
Question: I can create a table easily via SQL
Answer:
Fully functional with Paradox. Maybe functional with other Database
procedure TForm1.Button1Click(Sender: TObject);
var
Q: TQuery;
begin
Q := TQuery.Create(Application)
try
Q.DatabaseName := 'SF';
with Q.SQL do begin
Add('Create Table Funcionarios');
Add('( ID AutoInc,');
Add(' Name Char(30),');
Add(' Salary Money,');
Add(' Depno SmallInt,');
Add(' Primary Key ( ID ) )');
end;
Q.ExecSQL;
finally
Q.Free;
end;
end;