How to attach .mdf file to SQL Server 2005 without an .ldf file? I want to attach a database to SQL Server 2005 but I have only its .mdf file

How can I attach it?
E.g like this:

CREATE DATABASE AdventureWorks2012 ON (FILENAME = '{drive}:\{file path}\AdventureWorks2012_Data.mdf') FOR ATTACH_REBUILD_LOG;