SQL
Import a SQL File in MYSQL
MySQL command line to run an SQL file
Psql
How To Run a SQL File With psql
Importing a SQL file into a PostgreSQL database with psql