PG
create table demo ( id int, name bytea ); Insert into demo (id,name)values(256,pg_read_binary_file(‘imgs/1.png‘));
slq server
create table img( id varchar(50), name varbinary(max) ); INSERT INTO img (id,name) select ‘1‘ as id, * from OPENROWSET(BULK N‘C:\img.jpg‘,SINGLE_BLOB) as name
时间: 2024-11-06 18:21:49