Sql 插入操作时返回当前新增的Id
时间:2021-07-01 10:21:17
帮助过:3人阅读
string.Format(@"
insert into Table(FileSize,FileType,FilePath,FileExtName,OldFileName,NewFileName,FileHash,CreateTime,DeleteFlag)
values(
@FileSize,
@FileType,
@FilePath,
@FileExtName,
@OldFileName,
@NewFileName,
@FileHash,
@CreateTime,
@DeleteFlag);
select @@IDENTITY");
select @@IDENTITY --用select @@identity得到上一次插入记录时自动产生的ID
Sql 插入操作时返回当前新增的Id
标签:for ring str ble 记录 color ide select 返回