create table table_2
(
    table_num int not null,
table_pre float(1) not null,
    table_num*talbe_pre as table_cuontpre float(1) 
)
go乘积列应该怎么搞啊???貌似我忘记了。忘高手指点谢谢。急。。

解决方案 »

  1.   

    create table table_2
    (
      table_num int not null,
    table_pre float(1) not null,
      table_cuontpre as table_num*table_pre
    )
    go
      

  2.   

    create table table_2
    (
      table_num int not null,
    table_pre float(1) not null,
      table_cuontpre as convert(float(1), table_num*table_pre)
    )
      

  3.   

    float(1)不能确定小数位,要确定小数位请用numeric类型
      

  4.   


    create table table_2
    (
    table_num int not null,
    table_pre float(1) not null,
    table_cuontpre as table_num*talbe_pre 
    )
    table_cuontpre as 【table_num*talbe_pre】这部分是表达式,可以自己构造