-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- Written by Kimberly L. Tripp, SQLskills.com
-- All Rights Reserved.
-- 
-- For more scripts, sample code and additional training resources,
-- go to http://www.SQLskills.com
--	Immerse yourself in SQL Server
--
-- Disclaimer - Thoroughly test this script, execute at your own risk.
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

USE Northwind
go
SET NOCOUNT ON
go

CREATE TABLE dbo.DemoTable
(
	col1	int	 identity(100,10),
	col2	datetime default current_timestamp,
	col3	datetime default getdate(),
	col4	char(30) default suser_name(),
	col5	char(30) default user_name(),
	col6	char(80) default 'Now is the time for all good men to come to the aid of their country.'
)
go
SELECT * FROM dbo.DemoTable
go

-- To perform the INSERTs as individual transactions...
WHILE 1=1
INSERT dbo.DemoTable DEFAULT VALUES
go

-- To perform the INSERT as a single tran - REMEMBER, *you* must stop this!
BEGIN TRAN
WHILE 1=1
INSERT dbo.DemoTable DEFAULT VALUES
-- after this executes for a couple of minutes then stop the loop and commit
COMMIT TRAN
go
