I have this table:
CREATE TABLE [dbo].[Word] (
[WordId] INT NOT NULL,
[Name] VARCHAR (20) NOT NULL,
[StatusId] INT DEFAULT ((1)) NULL,
[Syllables] VARCHAR (20) NULL,
[Ascii] AS (ascii([Name])) PERSISTED,
[CategoryId] INT DEFAULT ((1)) NOT NULL,
[GroupId] INT DEFAULT ((1)) NOT NULL,
[LessonId] INT DEFAULT ((1)) NOT NULL,
[CreatedBy] INT DEFAULT ((1)) NOT NULL,
[CreatedDate] DATETIME DEFAULT (getdate()) NOT NULL,
[ModifiedBy] INT DEFAULT ((1)) NOT NULL,
[ModifiedDate] DATETIME DEFAULT (getdate()) NOT NULL,
[Version] ROWVERSION NULL,
PRIMARY KEY CLUSTERED ([WordId] ASC),
CONSTRAINT [FK_WordLesson] FOREIGN KEY ([LessonId]) REFERENCES [dbo].[Lesson] ([LessonId]),
CONSTRAINT [FK_WordWordCategory] FOREIGN KEY ([CategoryId]) REFERENCES [dbo].[WordCategory] ([WordCategoryId]),
CONSTRAINT [FK_WordWordGroup] FOREIGN KEY ([GroupId]) REFERENCES [dbo].[WordGroup] ([WordGroupId])
);
GO
CREATE NONCLUSTERED INDEX [Word_Category_IX]
ON [dbo].[Word]([CategoryId] ASC);
GO
CREATE NONCLUSTERED INDEX [Word_Group_IX]
ON [dbo].[Word]([GroupId] ASC);
GO
CREATE NONCLUSTERED INDEX [Word_Lesson_IX]
ON [dbo].[Word]([LessonId] ASC);
How can I change the value of WordId to be a random number that is between 1 and the maximum value of the INT column?
Note that I understand there's a possibility of the random number being used twice but it's test data so I am not too concerned about that.