I am working with While loop in sql and I have tried applying code on these dates.

```
DECLARE @StartDate DATETIME = '2018-08-01';
DECLARE @EndDate DATETIME = '2018-08-15';

WHILE @StartDate < @EndDate

BEGIN

SELECT @StartDate 
SET @StartDate = @StartDate+1

END;

```

When I run this I get the output in multiple windows though I want it to be in same window.

[![enter image description here](https://i.stack.imgur.com/Kl54T.png)](https://i.stack.imgur.com/Kl54T.png)