惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - DonLiang

有趣的排序 如何在ASP.NET2.0中通过Gmail发送邮件 C# - 函数参数的传递 使用ACE构建一个简单的客户端 【AJAX Volume2 - 02】Sys.Net.WebRequest 【AJAX Volume2 - 01】Sys.Application.notifyScriptLoaded 为VS2005安装STLport 慢性疲劳综合症的表现与干预[转] - DonLiang - 博客园 一点设想 励志生活-英国式选秀带来的启示 我是该说点什么了…… 《赢在中国》 AJAX里TabContainer的CSS 为CheckBox和DropDownList添加一个简易的JavaScript 重生 风流总被雨打风吹去..... ASP.NET里的路径的使用-客户端标记 ASP.NET里的路径的使用-预备篇 一线曙光
MYSQL中的LAST_INSERT_ID()和MSSQL中的@@IDENTITY
DonLiang · 2007-04-06 · via 博客园 - DonLiang

      按照应用需要,常常要取得刚刚插入数据库表里的记录的ID值,在MYSQL中可以使用LAST_INSERT_ID()函数,在MSSQL中使用@@IDENTITY。挺方便的一个函数。但是,这里需要注意的是,当使用INSERT语句插入多条记录的时候,使用LAST_INSERT_ID()返回的还是第一条的ID值,而@@IDENTITY返回最后一条。
      很简单的一个函数应用,不过,有时候会遗忘,记录一下,提醒自己。