VINNUSAURUS VINNUSAURUS - 5 months ago 20
SQL Question

How to store image in SQL Server database tables column

I Have a table named

FEMALE
in my database. It has
ID
as
PK
, it has an
Image
column.

My Question is how do I store an image using a SQL Query?

Answer

give this a try,

insert into tableName (ImageColumn) 
SELECT BulkColumn 
FROM Openrowset( Bulk 'image..Path..here', Single_Blob) as img

INSERTING

enter image description here

REFRESHING THE TABLE

enter image description here

Comments