Sqlite

From Wiki

(Difference between revisions)
Jump to: navigation, search
(Usage of SQLite to edit, update and modify a sqlite database.)
 
Line 18: Line 18:
  #Delete row
  #Delete row
  delete from users where user_id=5;
  delete from users where user_id=5;
-
 
+
 +
#To exit
 +
CTRL+d
Refs:
Refs:
http://www.pantz.org/software/sqlite/sqlite_commands_and_general_usage.html <br>
http://www.pantz.org/software/sqlite/sqlite_commands_and_general_usage.html <br>
http://sqlite.awardspace.info/syntax/sqlitepg01.htm
http://sqlite.awardspace.info/syntax/sqlitepg01.htm

Current revision as of 12:04, 20 February 2012

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