回答第三个问题:
create table #a (id decimal not null identity(9223372036854775808,1),id1 int)
go
insert #a values(1)
go
select * from #a
create table #a (id decimal not null identity(9223372036854775808,1),id1 int)
go
insert #a values(1)
go
select * from #a
解决方案 »
- 请教一个查询问题
- 高分了,如何在SQLSERVER数据库中插入image内容。
- sql2000 DB 维护计划“数据库维护计划”的DB备份作业,状态显示不在运行?
- sqlservr.exe无故占用了CPU99%的资源,但用停止sqlserver服务又停不了,只能从新启动,请问有无其它办法!!!!!!!!!!
- SQL 关于指定日期搜索语句得写法!请教达人!
- 怎么将数据库改名?
- 请教各位高手关于一段更新语句的写法
- 为什么局域网中用IP不能连接MSSQL用机器名确可以?
- 用VF3.0如何根据提供数据生成曲线图,并自动存为位图
- 跪求sql server的语句练习语句(复杂点得)
- 【100分】求一个高速排序查询思路!!!!!!!!!!!!!!!!!!!
- 这样的SQL语句该怎么写?
declare @t table(id int identity) select * from @t
union
select count(*) from @t where 2>1想不出,学习中
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
select * from tempdb..sysindexes where name in (select name from tempdb..sysobjects)
shinesky(找天的人) talantlee(風)
答得不对吗?
不用SET IDENTITY_INSERT如何插入一条记录?4.declare @t table (id int identity)
不用SET IDENTITY_INSERT,如何用insert一次插入多条记录?
-------
的确不会
不用SET IDENTITY_INSERT如何插入一条记录?迫切想知道这题的答案.
insert @t default values
看来要继续研究帮助亚
第四题,我没有测试,不知道理解的对不对插入二条的时候如下:
insert into @t select default from (select 1 as id union all
select 2 as id ) b where b.id>0
insert into @t select default from (select 1 as id union all
select 2 as id ) b
第四题我不会.困惑中...... 等答案.
http://community.csdn.net/Expert/topic/4170/4170545.xml?temp=.2137873
insert into #t select col. from table
http://community.csdn.net/Expert/topic/4167/4167889.xml?temp=6.554812E-02
我在查询分析器中执行你回答的第三个问题是结果是对的, 没有数据溢出。
但是我这样写:
declare @dec decimal
set @dec = 9223372036854775808
select @dec
--执行结果为:
服务器: 消息 8115,级别 16,状态 8,行 2
将 numeric 转换为数据类型 numeric 时发生算术溢出错误。(所影响的行数为 1 行)同样的是 decimal 类型为什么呢?
版主和各位给分析分析