- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to run SQL script in MySQL?
To run SQL script in MySQL, use the MySQL workbench. First, you need to open MySQL workbench.
The snapshot is as follows −
Now, File -> Open SQL Script to open the SQL script.
Alternatively, use the following shortcut key −
After that an option would be visible for you to choose your .sql file from the disk. In my system, the file is located on the Desktop. I will select the same “tblstudent” SQL file as shown in the following screenshot −
After browsing .sql files, you need to select the option “Reconnect to database” as shown in the following screenshot −
Now, it will ask for password to connect with MySQL. Add the password and click “OK” as in the following screenshot −
Note − Press OK button twice to connect with MySQL.
After completing the above process, the following screen will be visible with our SQL file “tblstudent”, which we uploaded before −
After that you need to execute the script. To execute the script, click the symbol marked in the following screenshot −
After that you will get the following output −
- How to run .SQL script using JDBC?
- Run SQL file in MySQL database from terminal?
- How to run a PowerShell script from the command prompt?
- How to echo print statements while executing an SQL script?
- How to run Selenium web driver from a Python CGI script?
- Performing Null check using HANA SQL Script
- How we can run Python CGI Script on Windows XP?
- How can I run a Linux command using Python CGI script?
- SQL Script vs Graphical Calcualtion views in SAP HANA
- MySQL Extensions to Standard SQL
- Run Python script from Node.js using child process spawn() method?
- How to make SQL case sensitive string comparison in MySQL?
- How can we run MySQL statements in batch mode?
- How to write a MySQL “LIMIT” in SQL Server?
- MySQL Differences from Standard SQL