018_RegionStore.sql 533 B

123456789101112131415161718
  1. BEGIN TRANSACTION
  2. CREATE TABLE dbo.Tmp_landaccesslist
  3. (
  4. LandUUID uniqueidentifier NULL,
  5. AccessUUID uniqueidentifier NULL,
  6. Flags int NULL
  7. ) ON [PRIMARY]
  8. IF EXISTS(SELECT * FROM dbo.landaccesslist)
  9. EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags)
  10. SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)')
  11. DROP TABLE dbo.landaccesslist
  12. EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT'
  13. COMMIT