In SQL Server we can use the SQL command to attach database to Microsoft Sql Server. Just copy the mdf file path  and run with the following command.
SQL CODE:

CREATE DATABASE DATABASE_NAME
ON PRIMARY (FILENAME='DATABASE_PATH')
FOR ATTACH;

To Attach the SQL Database using cmd (Video Guide):