SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
DECLARE @str VARCHAR(MAX) = 'The quick brown fox jumps over the lazy dog' SELECT SUBSTRING(@str, 1, CHARINDEX(' ', @str) - 1) + ' ' + right(rtrim(@str),CHARINDEX(' ',REVERSE(RTRIM(@str))+' ')-1)

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear