非常简单,同志们,快来抓分呀? 我只用过SQLSERVER,不知是否一样? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我只用过SQLSERVER,不知是否一样? 呵呵.sql server的alter table tablename add columnname char(10) null 试试 alter table tablename add (列名 char(10)) 注意括号 alter table tablename add (列名 char(10));应该没问题了! alter table temptable.db add column char(10) var InputStr: string;begin InPutstr := InputBox('输入要增加的字段名', 'Field:', ''); if Trim(Inputstr) = '' then Exit; Query1.close; Query1.requestlive := True; Query1.SQL.Clear; Query1.SQL.Add('ALTER TABLE DynicPara add Column '+InputStr+' char(10)'); Query1.ExecSQL; Query1.requestlive := False; Query1.Close;var InputStr: string;begin InPutstr := InputBox('输入要删除的字段名', 'Field:', ''); if Trim(Inputstr) = '' then Exit; Query1.close; Query1.requestlive := True; try Query1.SQL.Clear; Query1.SQL.Add('ALTER TABLE DynicPara drop Column '+InputStr); Query1.ExecSQL; except showmessage('我找不到这个字段:['+ Inputstr+ '] 不能进行此操作!'); end; 视频格式转化问题 ZSwang请进来,有事请教 有没有哪位delphi高手,私下带学员的?最好是在深圳. 关于StringGrid的问题的奇怪问题 动态创建的控件如何对其做某些事件? 如何把word文档上传到服务器(局域网),并可以在客户端打开word文档。能否给个例子? 救救我 急~,调用word出现的两的问题! 交DELPHI朋友 购买考勤管理系统源代码,请报价!email : [email protected] 如何完成组件的这种功能? 今日无话可说,翻箱倒柜,翻出废话一堆。
alter table tablename add columnname char(10) null
应该没问题了!
InputStr: string;
begin
InPutstr := InputBox('输入要增加的字段名', 'Field:', '');
if Trim(Inputstr) = '' then Exit;
Query1.close;
Query1.requestlive := True;
Query1.SQL.Clear;
Query1.SQL.Add('ALTER TABLE DynicPara add Column '+InputStr+' char(10)');
Query1.ExecSQL;
Query1.requestlive := False;
Query1.Close;var
InputStr: string;
begin
InPutstr := InputBox('输入要删除的字段名', 'Field:', '');
if Trim(Inputstr) = '' then Exit;
Query1.close;
Query1.requestlive := True;
try
Query1.SQL.Clear;
Query1.SQL.Add('ALTER TABLE DynicPara drop Column '+InputStr);
Query1.ExecSQL;
except
showmessage('我找不到这个字段:['+ Inputstr+ '] 不能进行此操作!');
end;