﻿  IF OBJECT_ID('dbo.getRand', 'V') IS NOT NULL BEGIN
    DROP VIEW dbo.getRand;
  END;
  GO

  CREATE VIEW dbo.getRand AS 
  SELECT RAND(CHECKSUM(NEWID())) AS newId
  GO