回答第三个问题:
create table #a (id decimal not null identity(9223372036854775808,1),id1 int)
go
insert #a values(1)
go
select * from #a

解决方案 »

  1.   

    1、
    declare @t table(id int identity) select * from @t 
    union 
    select count(*) from @t where 2>1想不出,学习中
      

  2.   

    回答第二個問題﹕有
    Defines the table data type. The table declaration includes column definitions, names, data types, and constraints. The only constraint types allowed are PRIMARY KEY, UNIQUE KEY, NULL, and CHECK
      

  3.   

    第2個問題是有建立索引的declare @tb table (a int primary key  ,b char(10))
    select * from tempdb..sysindexes where name in (select  name from tempdb..sysobjects)
      

  4.   

    2.xiaonvjing(飞扬) create table t(id decimal(38,0) identity(9223372036854775808,1))3. shinesky(找天的人) talantlee(風) declare @tb table (a int primary key  ,b char(10))select * from tempdb..sysindexes where name in (select  name from tempdb..sysobjects)
      

  5.   

    xiaonvjing(飞扬) 
    shinesky(找天的人) talantlee(風)
    答得不对吗?
      

  6.   

    MorningTea(早茶) 他们答得对,分都给了.还有两题
      

  7.   

    1.declare @t table (id int identity) (50分)
    不用SET IDENTITY_INSERT如何插入一条记录?4.declare @t table (id int identity) 
    不用SET IDENTITY_INSERT,如何用insert一次插入多条记录? 
    -------
    的确不会
      

  8.   

    1.declare @t table (id int identity) (50分)
    不用SET IDENTITY_INSERT如何插入一条记录?迫切想知道这题的答案.
      

  9.   

    创建临时表,实际上是在tempdb数据库内创建一个名字以"#"开头的临时表,上午我尝试直接在tempdb..syscolumns中添加新列并更新tempdb..sysobjects,然后对新列赋值,结果么成功
      

  10.   

    1 查帮助终于查出来了:
    insert @t default values
      

  11.   

    windindance(风舞轻扬) 强的!
    看来要继续研究帮助亚
      

  12.   


    第四题,我没有测试,不知道理解的对不对插入二条的时候如下:
    insert into @t  select default from (select 1 as id  union all 
                                         select 2 as id  ) b where b.id>0
      

  13.   

    第四题,我没有测试,不知道理解的对不对插入二条的时候如下:
    insert into @t  select default from (select 1 as id  union all 
                                         select 2 as id  ) b
      

  14.   

    windindance(风舞轻扬) 正解!http://community.csdn.net/Expert/topic/4170/4170545.xml?temp=.3809931就不用公布答案了,  
    第四题我不会.困惑中...... 等答案.
      

  15.   

    一不小心,发到C#版去了,转回来:
    http://community.csdn.net/Expert/topic/4170/4170545.xml?temp=.2137873
      

  16.   

    4.
    insert into #t select col. from table
      

  17.   

    xiaonvjing(飞扬)的分在这儿:
    http://community.csdn.net/Expert/topic/4167/4167889.xml?temp=6.554812E-02
      

  18.   

    to: xiaonvjing(飞扬)
    我在查询分析器中执行你回答的第三个问题是结果是对的, 没有数据溢出。
    但是我这样写:
    declare @dec  decimal
    set    @dec = 9223372036854775808
    select @dec
    --执行结果为:
    服务器: 消息 8115,级别 16,状态 8,行 2
    将 numeric 转换为数据类型 numeric 时发生算术溢出错误。(所影响的行数为 1 行)同样的是 decimal 类型为什么呢?
    版主和各位给分析分析