I created a sql server database with name of abc-123, in that I created a table Emp, when I run like
abc-123
select * from abc-123.emp;
Use [] round the database name:
[]
SELECT * FROM [abc-123].[dbo].emp;
OR
SELECT * FROM [abc-123].dbo.emp;