How to insert image in mysql database(table)?

后端 未结 8 2007
野趣味
野趣味 2020-12-13 05:08

I want to insert image into a table like

 CREATE TABLE XX_SAMPLE(ID INT
                       ,IMAGE BLOB);

So can you help out form how t

8条回答
  •  孤城傲影
    2020-12-13 05:35

    Please try below code

    INSERT INTO xx_BLOB(ID,IMAGE) VALUES(1,LOAD_FILE('E:/Images/jack.jpg'));
    

提交回复
热议问题