1
子增长的插入
2
/*创建表*/
3
create table teacher
4
(
5
id int identity(1,1) primary key not null,
6
name varchar(20)
7
)
8
9
select * from teacher
10
11
/*关闭自增长*/
12
SET IDENTITY_INSERT teacher on
13
14
insert into teacher(id,name) values(2000,'guo')
15
16
/*打开自增长*/
17
SET IDENTITY_INSERT teacher off
18
19
insert into teacher(name) values('guo')

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19
