显示的代码不增加 1,所有记录都显示相同的字符串值。
DECLARE @q_id NVARCHAR(50)
begin
SET @q_id='JEE_PHY_1'
UPDATE oems_question7 SET q_id = SUBSTRING (@q_id ,0,CHARINDEX('_', @q_id,5) + 1 ) + ' ' + CONVERT(NVARCHAR,CONVERT(INT, SUBSTRING ( @q_id ,CHARINDEX('_', @q_id,5) + 1, LEN(@q_id) )) +1)
WHERE id between 1 and 40
end