SQL 小技巧

SET IDENTITY_INSERT Table1 On
insert   into   Table1 (unic,Id,UserName,Text) select   newid(),(select top 1 Id from table1 order by id desc)+1,UserName,Text  from   table1 where  unic='9509f20d-e297-478b-9cc7-17675bfd8e2a'
SET IDENTITY_INSERT Table1 Off

注:Unic为NewID  ID为标识列 Text为Text类型

简单吧。

相关文章:

  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2021-11-12
  • 2022-01-11
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2022-02-01
  • 2022-01-09
相关资源
相似解决方案