请问如何用delphi修改SQL 2000的字段注释?(100分)

X

xmdsj

Unregistered / Unconfirmed
GUEST, unregistred user!
请问如何用delphi修改SQL 2000的字段注释?
用alter可以吗?
 
使用下面的语句 同时保证你的服务器允许对系统目录直接修改和你的用户名具有这个权限
update sysproperties set value='' 他为你要改的新值
where id = (select id from sysobjects where name='') 他为你的表名
and smallid=(select colid from syscolumns where name='' 他为你的字段名
and id=(select id from sysobjects where name='')) 他为你的表名
如改表tblUser的字段 CardID的注释为:卡号
update sysproperties set value='卡号'
where id = (select id from sysobjects where name='tblUser')
and smallid=(select colid from syscolumns where name='CardID'
and id=(select id from sysobjects where name='tblUser'))
在DELPHI 6 通过
另外 要先判断表sysproperties 有不有你要改的记录 如没有,则用insert


 
多人接受答案了。
 
顶部