Following code will display the list of database name with the physical location of that database .mdf file in your computer.
- SELECT name, physical_name FROM sys.master_files
When you run this command it will show following output.
Note: Path and the database name will be different based on your database list.