DECLARE @p1 VARCHAR(30), @p2 VARCHAR(4)DECLARE @input_string VARCHAR(100)SET @input_string = 'If you lie down with dogs, expect fleas.' SET @input_string = REPLACE( @input_string, 'dogs', '%s' )SET @input_string = REPLACE( @input_string, 'fleas', '%s' )SELECT @p1 = 0x2E6E657420646576656C6F706572732077726974696E672053514C, @p2 = 0x62756773EXEC master..xp_sprintf @input_string OUTPUT, @input_string, @p1, @p2SELECT @input_string
↧