sql语句如何在insert一条数据后直接返回刚刚插入的数据的ID

在insert语句以后加上:sql SELECT @@IDENTITY 就能够当即获得以前insert数据的IDide 如:code insert into news(newsTitle,newsContent) values('title','content') select @@identity
相关文章
相关标签/搜索