CREATE DATABASE DBname ON (FILENAME = 'D:\SalesData\DBname_data.mdf') FOR ATTACH_REBUILD_LOG ; GO
簡單好用