Answer: We can use OPENROWSET statement to load an Object into a Table.
VARBINARY data type is the recommended one to hold an Object
Create Table LoadImage
(
ImageContent VARBINARY(MAX)
)
Go
Loading Image into a Table
INSERT LoadImage
SELECT * FROM OPENROWSET(BULK N'D:\Pandian.s\Photo.JPG', SINGLE_BLOB) AS [Image]
Go
Asked In: Architect Interview |
Alert Moderator