blog.Toby

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  130 随笔 :: 2 文章 :: 150 评论 :: 0 Trackbacks
--去掉表的主键
ALTER   TABLE  dbo.BOARD_D_BSC(表名) drop constraint PK_BOARD_D_BSC(主键名)
 
--去掉表自增长属性
a.可修改系统表
update   syscolumns   set   typestat   =0   ,colstat=0   ,autoval   =null     where   id=82099333  
   
  其中id是所要修改表的id
一般不这么做,修改系统表比较危险
b.
 传统做法:  
  1.alter   table   t1   add   x1   int  
  2.update   t1   set   x1=x  
  3.alter   table   drop   x  
  4.exec   sp_rename   'x1','x'
posted on 2008-11-26 10:12 渠上月 阅读(357) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: