Via this post.
I created a column in a certain table to contain various files with "VarBinary(MAX)" as its data type.
I wanted to test stuff, so I needed data in the tables.
But Oh My, Now What? Should I really write C# Project to insert a file?
Well, no, not needed, you can do it directly from SQL.
Create Table EmployeeProfile
(
EmpId int,
EmpName varchar(50) not null,
EmpPhoto varbinary(max) not null
)
Go
Insert EmployeeProfile (EmpId, EmpName, EmpPhoto)
Select 1001, 'Vadivel',
BulkColumn from Openrowset( Bulk 'C:\Blue Lace 16.bmp', Single_Blob) as EmployeePicture