declare @id int
insert tablea(name) values ('张三')
set @id=SCOPE_IDENTITY()
insert tableb(tablea_id,content) values (@id,'content')