Our SQL file has been located within the “D” directory of Windows 10 we have to navigate towards the intended location as per the below demonstrated image. Add the location of a file to the search area. Make sure your SQL file must contain some queries or command to be executed. You have to select the SQL file you want to import into the pgAdmin by choosing or changing the location of a file. You can see, it will open the default “C” directory of your Windows 10 automatically. Tap on that folder icon to explore and select the files and folders of your Windows 10.Ī window named “Select file” will be opened on your pgAdmin graphical user interface screen, as demonstrated in the image below. Within this taskbar, you will find an icon of the folder next to the icon of the database query tool icon and before the floppy drive icon, which can be seen in the image below. For that purpose, you will be using the taskbar of query editor. We have to run a “SQL” file from our system we have to first import or add that file into the pgAdmin graphical user interface. The query area on your pgAdmin screen can be seen in the output image below. This will open the Query Editor of pgAdmin within the database Postgres within the GUI window. Tap on the option of Query Tool, as also demonstrated in the image below, to open the query editor on your screen panel of the PostgreSQL pgAdmin graphical user interface. So, right-click on the Postgres database and go a little down to the other options. We have to create a table or insert some records, which is impossible without a database. Another way to open the query tool is via the Database Postgres that has been built in already. You can tap on the query tool icon residing at the taskbar of pgAdmin. Now we have to open the query tool to run a “.sql” file. So, we will use the already built-in database Postgres from the list. Upon exploring, you can create a new database or easily use the already built-in Postgres database within the “Databases” option. The pgAdmin graphical interface opening screen has been shown below. So, after adding the database password, tap on the “OK” button on a dialogue box opened on your screen to start using the pgAdmin graphical user interface. After entering the password, you may need to add the PostgreSQL database password to get into it once again. It requires you to enter the Master password to run pgAdmin. So, search for the installed pgAdmin GUI from the menu bar of the windows 10 desktop and tap on it when it is highlighted, then open it. The first method to run a “.sql” file in PostgreSQL uses its pgAdmin graphical user interface. In this article, we will show you the implementation of running SQL files using both ways for the ease of PostgreSQL users. There is mainly two ways to run any “.SQL” file in PostgreSQL, e.g., pgAdmin user interface and SQL shell of PostgreSQL.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |