I have the following data and I don’t understand how the where clause works
CREATE TABLE ##TBL (ID  INT, StartDate DATE,    EndDate DATE)
 INSERT INTO ##TBL VALUES
 (1,'2018-01-01','2018-02-07'), (2,'2018-01-02','2018-09-17'),
 (3,'2018-01-03','2018-07-12'), (4,'2018-01-04','2018-07-03'),
 (5,'2018-01-05','2018-05-31'), (6,'2018-01-06','2018-07-28'),
 (7,'2018-01-07','2018-03-08'), (8,'2018-01-08','2018-08-05'),
 (9,'2018-01-09','2018-09-20'), (10,'2018-01-10','2018-08-14'),
 (11,'2018-01-11','2018-03-30'), (12,'2018-01-12','2018-03-02'),
 (13,'2018-01-13','2018-05-15'), (14,'2018-01-14','2018-03-14'),
 (15,'2018-01-15','2018-08-22'), (16,'2018-01-16','2018-04-09'),
 (17,'2018-01-17','2018-06-03'), (18,'2018-01-18','2018-09-30'),
 (19,'2018-01-19','2018-04-03'), (20,'2018-01-20','2018-02-14');
When I execute the query using the code below based on the date parameter, I don’t understand the result
DECLARE @RportDate DATE 
      SET @RportDate='2018-01-04'
 SELECT* FROM ##TBL
 WHERE @RportDate BETWEEN StartDate AND EndDate
 DROP TABLE ##TBL
For I example if I use the date '2018-01-04' for the parameter I have this result
ID  StartDate   EndDate
1   2018-01-01  2018-02-07
2   2018-01-02  2018-09-17
3   2018-01-03  2018-07-12
4   2018-01-04  2018-07-03
And if I change the date to '2018-01-02' The output will be
ID  StartDate   EndDate
1   2018-01-01  2018-02-07
2   2018-01-02  2018-09-17
My question is does the query only filter for the startDate? Any explanation for this behaviour