MySQL Tutorial/String Functions/LOAD FILE

Материал из SQL эксперт
Перейти к: навигация, поиск

LOAD_FILE(file_name): Reads the file and returns the file contents as a string

The file size must be less than max_allowed_packet bytes.

If the file does not exist or cannot be read, the function returns NULL.



   <source lang="sql">

UPDATE myTable SET text_col=LOAD_FILE("/tmp/picture");</source>