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

  

微信公众号:

 pg 和sql server 分别如何新建二进制数据库字段以及插入二进制数据的sql语句

相关文章:

  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2021-11-15
猜你喜欢
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-11-16
  • 2022-12-23
相关资源
相似解决方案