`

Oracle & Sysbase 修改表结构

    博客分类:
  • DB
阅读更多
Oracle数据库
alter table table_name add (column_name1 col_type1,column_name2 col_type2)--添加字段

alter table table_name  drop COLUMN column_name1 --删除字段

Sysbase数据库
alter table table_name add column_name varchar(255) null--添加字段



--删除
alter   table   你的表   drop   constraint   主键名
go
--修改
ALTER   TABLE   你的表   ALTER   COLUMN   列名   你的类型  
go
--增加
alter   table   你的表   add   constraint   主键名   primary   key   (列名)
go
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics