Table and query design options
While it is not exactly clear what you need but if you design your tables similar to below then you should be able to retrieve the details that you need. 

create table alert
(
  id int,
  aname varchar(10)
);
create table device
(
  id int,
  dname varchar(10)
);
create table alertDetails
(
  alertId int,
  deviceId int,
  alertDate datetime
);


Then when you query, you could use the following:

select *
from alert a
left join alertdetails ad
  on a.Id = ad.alertid
left join device d
  on ad.deviceid = d.id
where a.id = 1


See SQL Fiddle with a Demo