求救:在DELPHI中,如何在已经存在的表中增加一个新字段。其中字段名称不动态赋值。

解决方案 »

  1.   

    1 delphi中
        with FieldDefs do begin
          Clear;
          with AddFieldDef do begin
            Name := 'Field1';
            DataType := ftInteger;
            Required := True;
          end;
    2   用sql语句
    alter table add columns b int
      

  2.   

    ALTER TABLE test--表名
     ADD AddDate --字段名
    smalldatetime --类型
    NULL
      

  3.   

    用sql语句
    alter table add columns b int
      

  4.   

    ALTER TABLE test--表名
     ADD AddDate --字段名
    smalldatetime --类型
    NULL