Getting started with cmd prompt / Git terminal for SQL

I am a total newbie to the coding world so apologies for the basic queries.

I am trying to run the sqlite3.exe files from cmd/Git Bash cmd prompt. I directly open the sqlite3.exe file but am unable to access database files from sqlite3.exe?

  1. Am i missing any steps?
  2. Is there another way to run sqlite from a more user friendly console similar to the ones in codeacademy exercises?


Thanks for your help!

Hi there,

Whenever you execute an SQL statement you need to close your statement by semi-colon (;), put semi-colon on your statement and I think you would be fine.

1 Like


In addition to adding a semicolon as @betizazualemu2392118 mentioned, you also need to open or create a database file before trying out any queries. As the prompt tells you, use .open FILENAME to open a database. If the file is not located in the same folder as your sqlite3.exe, then you will need to use .open PATH/TO/YOUR/FILE/FILENAME.db or navigate to the correct folder using SQLite’s .cd command.

Another, more beginner-friendly option is to download and use DB Browser for SQLite.

1 Like

Thanks, I ensured that

  1. Semicolon is put after SQL statements
  2. ‘usgs.sqlite’ file is within the same folder. Probably it requires a tables name with Select and .open command before the statement.

Have switched to DB browser. It is quite user-friendly and has made the experience very smooth.
Any thoughts on which Sql softwares / consoles are used in ecommerce / technology companies?