sql語句如何在insert一條數據後直接返回剛剛插入的數據的ID

在insert語句以後加上:sql SELECT @@IDENTITY 就能夠當即獲得以前insert數據的IDide 如:code insert into news(newsTitle,newsContent) values('title','content') select @@identity
相關文章
相關標籤/搜索