10

I am trying to run sqlite from the command prompt. So I have this downloaded sqlite-shell-win32-x86-3071100.zip from this website http://www.sqlite.org/download.html

Now there is a set up.exe from which v can run sqlite commands. When I say

C:\Users\..>'sqlite3' is not recognized as an internal or external com

''sqlite3'' is not recognized as an internal or external command,
operable program or batch file.

Any hints.

Thank you Sun

5
  • 3
    Do you have sqlite3 in your system PATH? You can check by using the command "echo %PATH%" in the command prompt. Commented Apr 30, 2012 at 18:04
  • I have sqlite3.exe on C:\Stuff. Can u give me an example of a command in sqlite if I run the executable from this location. Commented Apr 30, 2012 at 18:08
  • I'm not sure I understand you. It looked like you are trying to run sqlite3 from the command prompt (cmd.exe). If you want to do that you need to have sqlite3.exe in your PATH. Otherwise the command prompt will not know where to find the program and will throw a "cannot find program sqlite3" or similar error. Commented Apr 30, 2012 at 18:10
  • navigate to the current directory your sqlite3.exe file is, so in this case cd sqlite3 , the execute the sqlite3.exe this should work. Commented May 3, 2018 at 23:43
  • you could use the exact path of the sqlite3.exe for example: c:\sqlite\sqlite3.exe Northwind.db -init Northwind4SQLite.sql Commented Aug 27, 2023 at 5:49

6 Answers 6

14

From your windows command prompt, you can start sqlite3 either with:

cd c:\Stuff
sqlite3.exe

or with:

c:\Stuff\sqlite3.exe

Either way, I assume from your comment that sqlite3.exe is in c:\Stuff.

As Michael mentioned, you can also add the path of the directory containing sqlite3.exe to your PATH. Fro a quick search I found this guide: http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx

Sign up to request clarification or add additional context in comments.

3 Comments

An easier way to do it from the command line would be PATH=%PATH%;c:\Stuff
i downloaded sqlite3.dll and its not coming in cmd
1

I assume that you already have sqlite in your system path since the instructions on how to do this are clear.

The likely problem is that you have created a folder called sql3 and have put the three executable files in a folder within that folder.

Check that all three executable files are within the file itself.

Comments

1

Go to an environment variable and add new environment variable C:\sqlite as I have saved the sqlite3 files under sqlite folder of C drive. It worked for me

Comments

1

It maybe possible that when u have extracted files from the downloaded zip folder,2 folders are created of the same name one inside the other. So in the cmd prompt u have to enter that folder 2 times by using . E.g-C:....\sqlite-tools-win32-x86-3330000\sqlite-tools-win32-x86-3330000 and then use sqlite3

Comments

0

If your sqlite3.exe is in C:\Stuff, you can check really quick to see if it's in your PATH.

echo %PATH% will give you your full path. If you don't see ;C:\Stuff there (probably near the end), that's why windows can't find sqlite3.exe.

If you don't see it, run:

setx path "%PATH%;C:\Stuff"

That should be problem solved. Open a new command prompt (it only updates PATHS when the terminal opens), run echo %PATH% and you should now see ;C:\Stuff at the end.

Congrats. sqlite should work in the terminal moving forward.

Comments

0

download package for your system form here

https://www.sqlite.org/download.html

After extracting.

Put the folder into c:/ drive

from there go into the folder, when you see .exe files copy the file explorer address. and add a new environment variable with the copied address.

Hurray, go and type sqlite3 in command prompt see if it worked.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.