insert into Tb_People(uname,era,amount) values( '兆周','老年','10000') select @@identity --当运行完插入语句后,执行select @@identity就可得到自动生成的id --如果是sql server 最好用select SCOPE_IDENTITY() as id --因为@@identity全局的 select SCOPE_IDENTITY() as id select IDENT_CURRENT ('Tb…