Sqlite

From Wiki

Jump to: navigation, search

Using SQLite

#Open SQLite database
sqlite databasefile

#List tables
.tables

#Desc tables
.schema users

#Select
select * from users;

#Update table
update users set email="test@test.com" where email="wrongemail@test.com";

#Delete row
delete from users where user_id=5;

#To exit
CTRL+d

Refs: http://www.pantz.org/software/sqlite/sqlite_commands_and_general_usage.html
http://sqlite.awardspace.info/syntax/sqlitepg01.htm

Personal tools