What is the easiest way to update an image field with the content of a file

后端 未结 1 1744
暖寄归人
暖寄归人 2020-12-28 10:17

I\'ve a table in MS Sql server with an image field and a file. What is the easiest way to create a T-Sql script that updates the field with the content of the file?

相关标签:
1条回答
  • 2020-12-28 10:40
    UPDATE YourTable
    SET BlobColumn = 
        (SELECT  BulkColumn FROM OPENROWSET(BULK  N'C:\YourFile.png', SINGLE_BLOB) AS x)
    WHERE ...
    
    0 讨论(0)
提交回复
热议问题