RT,比如说现存表名是ABC,如何在这张表中新增加一个列BBB
选择alter table ABC
add column BBB会报错- - 

解决方案 »

  1.   

    alter table ABC 
    add BBB int --类型
      

  2.   

    alter table ABC 
    add column BBB 类型
      

  3.   

    我的问题是:在一张表中新建一个列,应该如何实现?该列功能是计算一些数值,比如把同一张表中的某一个列的数字整除18
    自己写的是:
    alter table course
    add column (Total_perior/18) week_perior int constraint check unique 
    会报错,请问应该如何修改?
      

  4.   

    先加列
    alter table course
    add column bbb
    然后update
    update course set bbb=
      

  5.   

    我现在就是这样做的,但是在创建约束时提示CREATE UNIQUE INDEX 终止,因为发现了索引 ID 4 的重复键。最重要的主键为 '3'。
      

  6.   

    已经有重复的了 UNIQUE关键字 只能在这一列是唯一值得时候可以创建
      

  7.   

    alter table ABC
    add column BBB ->
    alter table ABC
    add BBB +DataType
      

  8.   


    有人回答了,具体还要LZ到联机丛书里面去看看“alter table”