USE [Users_mdb]
GO

IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tblComputerAccessory')
BEGIN

CREATE TABLE [dbo].[tblComputerAccessory](
	[nID] [int] NOT NULL,
	[tName] [nvarchar](255) NULL,
	CONSTRAINT [PK_tblComputerAccessory] PRIMARY KEY NONCLUSTERED ( [nID] ASC))

END
	
GO

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=1)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (1, N'Mouse');
	
IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=2)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (2, N'Keyboard');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=3)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (3, N'Speakers');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=4)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (4, N'Computer Stand/Docking Station');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=5)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (5, N'External Network Card/WiFi/MiFi');
	
IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=6)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (6, N'Webcam');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=7)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (7, N'Grapic Tablet');
	
IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=8)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (8, N'Headphone/Headset');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=9)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (9, N'Battery');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=10)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (10, N'Lock');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=11)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (11, N'External CD/DVD/Blue-Ray');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=12)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (12, N'Laptop Bag/Case');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=13)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (13, N'Laptop Charger/Adapter');

IF NOT EXISTS(SELECT * FROM [tblComputerAccessory] WHERE nID=14)
	INSERT [dbo].[tblComputerAccessory] ([nID], [tName]) VALUES (14, N'External Hard Disk');

GO

