Once in a while my colleagues ask me to change a jpeg image stored in a databaserecord, and every single time they ask I need to search all my sql files to find the query needed to do this.

Maybe I’m not the only one who needs this, that’s why I’m posting my solution here… have fun with it…

update [schema].[table_containing_image_record]
SET [Image_field] = (SELECT BulkColumn FROM OPENROWSET(Bulk '[ full path to file on sql server drive ]', SINGLE_BLOB) AS BLOB)
where [selection criteria]