Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-16-2010, 10:12 AM   #1
Registered: Jun 2010
Posts: 32

Rep: Reputation: 15
Question running sql script under sqlite3

Hi, I am a newbie to sqlite3 db. I have been given a sql script with SQL commands in it to set up a new sqlite3 db. How do I run such a thing?
Old 06-16-2010, 10:23 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
One way:

1. Start a terminal window

2. Run sqlite3 with your database filename:
sqlite3 test.db
<= This will create "test.db" if it doesn't already exist
Substitute your actual DB filename for "test.db"
3. From inside the sqlite3 shell, run your script:
<= substitute your actual script name
Two good links:

'Hope that helps .. PSM

The first link also has some good information about using sqlite from C/C++ (and other languages), per your earlier posts...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop or check SQlite3 database continuously, when query found run script for first 3 Techno Guy Linux - Newbie 3 09-27-2009 08:46 PM
MY SQL running at 90% - Web site is bogged down - culprit? muskiediver Linux - Newbie 1 08-03-2006 08:05 AM
Shell script to run pl/sql script. colly Linux - General 1 09-09-2004 07:49 AM
Running SQL on linux digital bots Linux - Software 3 06-04-2004 05:44 PM
how do i connect thru SQL Server Running on windows NT puru_09 Linux - Software 1 08-11-2002 11:05 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration