This is now an actual repo:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
To directly add a file to blob | |
(this example was a 120mb file) | |
*/ | |
INSERT INTO [dbo].[TableWithBlob](Id, ProductId, Filename, [ActualFile]) | |
SELECT 1,1,'filename',BulkColumn | |
FROM OPENROWSET(BULK N'c:\clients\test.exe', SINGLE_BLOB) as AnyAliasFieldYouLike | |
/* |