插入数据返回主键值用 output inserted.UId

insert into User output inserted.UId
values('admin','dongdong');

原文地址:https://www.cnblogs.com/poli/p/4297825.html