//取得数据库表名  
  select   name   from   sysobjects   where   xtype='u' order by name  
   
  //取得数据库表的字段  
  select   c.*   from   syscolumns   c,   sysobjects   o  
  where   c.id   =   o.id   and   o.type   =   'U'   and   o.name   = 'tableName'  

  //修改数据库字段名  
  EXEC   sp_rename   'tablename.oldcolumnname',   'newcolumnname'  
   
  //新增数据库字段  
  ALTER   TABLE   tablename   ADD   newcomlum   int   NULL  
   
  //删除数据库字段  
  ALTER   TABLE   tablename   DROP   COLUMN   newcomlum

相关文章:

  • 2021-07-13
  • 2022-12-23
  • 2021-05-28
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2021-10-20
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-10-21
相关资源
相似解决方案