SQL Server 2012
using Database "AdventureWorks2012"
Table "DatabaseLog"
This is from the Message screen in SSMS:
Add column names to temp table as data:
INSERT INTO ##DatabaseLog
( [DatabaseLogID],[PostTime],[DatabaseUser],
[Event],[Schema],[Object],[TSQL],[XmlEvent],[Order] )
VALUES
(...