Reputation: 13636
I have a SQL Server 2008 database with a table containing an image
column.
Any idea how to write query to insert bin file to the image field?
Thank you in advance!
Upvotes: 0
Views: 4222
Reputation: 33391
Totally agree with marc_s
.
But your query will be something like this.
INSERT yourtable(ImageColumn)
SELECT image FROM
OPENROWSET(BULK, 'filename.png', SINGLE_BLOB) AS blobtable(image)
Upvotes: 1