Is there any way to import files into a custom field for uploaded files?
You asked about SQL, but it is generally recommended to use the API rather than direct SQL. See the Attachment API - examples in the Code Docs section of API Explorer.