Saturday, June 1, 2013

Save images in Database using Sql Query | Using OPENROWSET save Images in sql server database

Below is the sql query to save images from disk into the database :


CREATE TABLE EmployeeDetails(EmpPhoto image)
INSERT INTO EmployeeDetails(EmpPhoto)
SELECT * FROM
OPENROWSET(BULK N'C:\Users\chandansingh\Desktop\download.jpg', SINGLE_BLOB) cs

No comments:

Post a Comment