USE [MyDB]
DECLARE @FileTypeTitle NVARCHAR(50);
DECLARE @Extension NVARCHAR(50);
DECLARE @FileType INT;
DECLARE @MIME NVARCHAR(100);
SET @FileTypeTitle = 'Document'; --file type titles are Image, Document, Flash
SET @Extension = '.pptx';
SET @MIME = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
SELECT @FileType = [FileTypeID] FROM [dbo].[FileType] WHERE [Title] = @FileTypeTitle
INSERT INTO [dbo].[FileTypeExtension] ([Extension], [FileTypeID], [ContentType]) VALUES(@Extension, @FileType, @MIME)
SELECT * FROM [dbo].[FileTypeExtension] ORDER BY [FileTypeExtensionID] DESC