时间:2010-07-26 10:00:01

标签: sql sql-server-2008

3 个答案:

答案 0 :(得分:4)

答案 1 :(得分:1)

INSERT T DEFAULT VALUES 

或者插入多行(使用spt_values表一次最多2048行)

SET IDENTITY_INSERT t ON
INSERT INTO t (id) 
SELECT Number + COALESCE(IDENT_CURRENT('t'),0) + 1
FROM master.dbo.spt_values
where type='p' and number < 2048
SET IDENTITY_INSERT t OFF

答案 2 :(得分:0)

INSERT INTO <tablename> DEFAULT VALUES;