Your Question: How Do I Run a Sql Script in Unix Shell?
Contents

How do I run a SQL script in Unix?

To run a SQL script using SQL*Plus, place the SQL along with any SQL*Plus commands in a file and save it on your operating system. For example, save the following script in a file called “C:emp. sql”. CONNECT scott/tiger SPOOL C:emp.

How do I run a MySQL script from Unix shell?

Lets, start with running single MySQL query from command line :

  1. Syntax : …
  2. -u : prompt for MySQL database username.
  3. -p : prompt for Password.
  4. -e : prompt for Query you want to execute. …
  5. To check all available databases: …
  6. Execute MySQL query on command line remotely using -h option :
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest