Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)

I need to insert an image into a table like:

 CREATE TABLE XX_SAMPLE(ID INT
                       ,IMAGE BLOB);

So can anyone help me out to insert an image into the above table?

1 Answer

0 votes
by (12.7k points)
edited by

You can try the below code for inserting an image:

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

Jump start your career in the field of SQL with this SQL Training course today!

Do check out the below MySQL tutorial video that will help you out in a better way:

Related questions

0 votes
1 answer
asked Jul 20, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
asked Dec 25, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer

Browse Categories

...