Note that there are some explanatory texts on larger screens.

plurals
  1. POsqlite3 api interacting with databases
    primarykey
    data
    text
    <p>I have an issue when running this simple example from here: </p> <p><a href="http://www.yolinux.com/TUTORIALS/SQLite.html" rel="nofollow">SQLite example</a></p> <p>I created the database </p> <pre><code>[prompt]$ sqlite3 /tmp/bedrock.db sqlite&gt; .help sqlite&gt; CREATE TABLE employee (Name varchar(20),Dept varchar(20),jobTitle varchar(20)); sqlite&gt; .schema employee CREATE TABLE employee (Name varchar(20),Dept varchar(20),jobTitle varchar(20)); sqlite&gt; INSERT INTO employee VALUES ('Fred Flinstone','Quarry Worker','Rock Digger'); sqlite&gt; INSERT INTO employee VALUES ('Wilma Flinstone','Finance','Analyst'); sqlite&gt; INSERT into employee values ('Barney Rubble','Sales','Neighbor'); sqlite&gt; INSERT INTO employee VALUES ('Betty Rubble','IT','Neighbor'); sqlite&gt; .tables employee sqlite&gt; SELECT Name FROM employee WHERE dept='Sales'; Barney Rubble sqlite&gt; SELECT * FROM employee; Fred Flinstone|Quarry Worker|Rock Digger Wilma Flinstone|Finance|Analyst Barney Rubble|Sales|Neighbor Betty Rubble|IT|Neighbor sqlite&gt; DELETE FROM employee WHERE dept='Sales'; sqlite&gt; .output /tmp/bedrock.sql sqlite&gt; .dump sqlite&gt; .exit </code></pre> <p>Everything seemed allright and i exited the program, but after i enter again in sqlite3 program, the database was not there when i tried the <code>.databases</code> command (but it appeared prior to the exit), and i don't know how can i make modifications on it again.</p> <p><strong>UPDATE:</strong> </p> <p>I managed to find <a href="http://www.sqlite.org/quickstart.html" rel="nofollow">this page</a> on the official documentation website and it worked out perfectly which is fine for me. But i'm still bothered about modifying the database and updating stuff after i exit the sqlite3 application. Is there any way in which i can interact with a database of my choice ? add/remove tables after the creation of the database ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload