| How to
insert a photo into the photo table? |
|
Execute the following
script in Query Editor to load up a photo from a file:
Use AdventureWorks;
INSERT Production.ProductPhoto (
ThumbnailPhoto,
ThumbnailPhotoFilePath,
LargePhoto,
LargePhotoFilePath)
SELECT ThumbnailPhoto.*, null, null, N'mountainkingsmall.gif'
FROM OPENROWSET
(BULK 'd:\data\images\mountainking.jpg', SINGLE_BLOB) ThumbnailPhoto
|
| The World Leader
in SQL Server Training |
|