T1: DBeaver executes external sql files
If the database already exists, right-click the library name directly, as shown in the figure below:
If the database does not exist and the external sql file contains database building statements, you can manually build the database first, then delete the database building statements in the sql file and execute the script.
This method is more troublesome. The method of directly executing the sql script is as follows:
First connect the external sql file in the Scripts folder,
Then associate the linked file with the data source,
Right-click on the connection name, create a new task,
Create a task to execute SQL scripts,
Select the script file just linked,
Then select the database to be executed. If the sql file is associated with the data source before, it will be automatically selected here.
continue,
If the task is no longer needed, you can delete the task,
You can delete it here.