Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有图像表。
我想在数据库端测试一些图像。
如何将图像从桌面插入图像表?
图像表具有如下列,
Id, Image_Name Image
谢谢。
您可以使用OPENROWSET (SQL-Server 2005+)
INSERT INTO dbo.Files (FileName, [File]) SELECT 'MyPic.bmp' AS FileName, * FROM OPENROWSET(BULK N'C:\MyPic.bmp', SINGLE_BLOB) AS [File]