About 969,000 results
Open links in new tab
  1. command line - How to run SQL script in MySQL? - Stack Overflow

    Jan 20, 2012 · From Workbench: File > Run SQL Script -- then follow prompts From Windows Command Line: Option 1: mysql -u usr -p mysql> source file_path.sql Option 2: mysql -u usr -p '-e …

  2. Execute SQL script from command line - Stack Overflow

    providing a file name containing all my SQL queries is much more handy than providing the SQL query as command-line arguments.

  3. Run PostgreSQL queries from the command line - Stack Overflow

    Oct 30, 2013 · But I face few issues sometimes such as if the column name is similar to any reserved keyword of postgresql such as natural in this case similar SQL is difficult to run from the command …

  4. Run a PostgreSQL .sql file using command line arguments

    Mar 16, 2012 · Run a PostgreSQL .sql file using command line arguments Asked 13 years, 9 months ago Modified 1 year ago Viewed 1.4m times

  5. How can I import an SQL file using the command line in MySQL?

    Jul 10, 2019 · I have a .sql file with an export from phpMyAdmin. I want to import it into a different server using the command line. I have a Windows Server 2008 R2 installation. I placed the .sql file on the C ...

  6. How can I issue a single command from the command line through sql …

    Mar 12, 2009 · But is it possible to just run a single command with a similar syntax, without a whole separate script file? As in: c:\>sqlplus username/password@databasename @execute …

  7. How to connect to MySQL from the command line - Stack Overflow

    Feb 27, 2011 · How can you connect to MySQL from the command line in a Mac? (i.e. show me the code) I'm doing a PHP/SQL tutorial, but it starts by assuming you're already in MySQL.

  8. How to connect to SQL Server from command prompt with Windows ...

    Mar 21, 2014 · Sqlcmd -u username -p password assumes a username & password for the SQL Server already setup Alternatively how can I setup a user account from command prompt? I've SQL Server …

  9. how to execute .sql files in postgres database - Stack Overflow

    Mar 30, 2017 · psql -f file_with_sql.sql This command executes all commands line-by-line (except when the file contains BEGIN…END blocks. In this case, commands in blocks execute in a transaction). To …

  10. How to run command-line SQLite query and exit? - Stack Overflow

    Jul 2, 2015 · When I use the -cmd option with SQLite3 to run a query SQLite3 opens the database and waits for interactive input. How can I run a query on SQLite3 from the command line and exit?