此代码生成随机字符串。 如何将字符串连接到此代码??
CREATE TRIGGER dbo.insUser
ON dbo.UserProfile
AFTER Insert
AS
BEGIN
SET NOCOUNT ON;
DECLARE @UserId int
SET @UserId = (SELECT max(UserId) FROM UserProfile)
UPDATE UserProfile set captcha =replace(SUBSTRING(CONVERT(varchar(255), NEWID()),8, 8),'-','')
WHERE UserId=@UserId
END
答案 0 :(得分:0)