[请教] 如何获取新增记录的自增ID??
如题:想在新增一条记录后再获取它的ID,以前看到有种 select @@id 的方法
但不知道具体该怎么用
向高手请教一下!
sql="INSERT INTO jobs (job_desc,min_lvl,max_lvl) VALUES 'Accountant',12,125) SELECT @@IDENTITY AS 'Identity'" con.execute(sql) response.Redirect(new.asp?id="新增ID")