I have stored a PDF file in SQL Server table with the following commands now I want to get the same file from the table can you please tell me how do I get this PDF file in the readable format.
create table attachments (
srno int
, description varchar(1000)
, attachment_type varchar(30)
, attachment varbinary(max)
);
insert into attachments
values (1, 'Holiday List 2022', 'PDF'
, (select * from Openrowset(BULK 'C:\Temp\export_holiday_list.pdf', SINGLE_BLOB) as pdf));
select * from attachments;