SQLite Tutorial - WordPress

Transcription

SQLite Tutorial

SQLITE TUTORIALSimply Easy Learning by tutorialspoint.comtutorialspoint.comi

ABOUT THE TUTORIALSQLite TutorialSQLite is a software library that implements a self-contained, serverless, zero-configuration,transactional SQL database engine. SQLite is the most widely deployed SQL database engine in theworld. The source code for SQLite is in the public domain.This tutorial will give you quick start with SQLite and make you comfortable with SQLite programming.AudienceThis reference has been prepared for the beginners to help them understand the basic to advancedconcepts related to SQLite Database Engine.PrerequisitesBefore you start doing practice with various types of examples given in this reference, I'm making anassumption that you are already aware about what is database, especially RDBMS and what is acomputer programming language.Copyright & Disclaimer Notice Allthe content and graphics on this tutorial are the property of tutorialspoint.com. Any content fromtutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or formwithout the written permission of tutorialspoint.com. Failure to do so is a violation of copyright laws.This tutorial may contain inaccuracies or errors and tutorialspoint provides no guarantee regarding theaccuracy of the site or its contents including this tutorial. If you discover that the tutorialspoint.com siteor this tutorial content contains some errors, please contact us at webmaster@tutorialspoint.comTUTORIALS POINTSimply Easy Learning

Table of ContentSQLite Tutorial . 2Audience . 2Prerequisites . 2Copyright & Disclaimer Notice. 2SQLite Overview . 12What is SQLite? . 12Why SQLite? . 12History: . 13SQLite Limitations: . 13SQLite Commands: . 13DDL - Data Definition Language: . 13DML - Data Manipulation Language: . 13DQL - Data Query Language: . 14SQLite Installation . 15Install SQLite On Windows. 15Install SQLite On Linux. 15Install SQLite On Mac OS X . 16SQLite Commands . 17Formatting output . 19The sqlite master Table . 19SQLite Syntax . 20Case Sensitivity . 20Comments . 20SQLite Statements . 20SQLite ANALYZE Statement:. 20SQLite AND/OR Clause: . 21SQLite ALTER TABLE Statement: . 21SQLite ALTER TABLE Statement (Rename): . 21SQLite ATTACH DATABASE Statement:. 21SQLite BEGIN TRANSACTION Statement: . 21SQLite BETWEEN Clause: . 21SQLite COMMIT Statement: . 21SQLite CREATE INDEX Statement: . 21SQLite CREATE UNIQUE INDEX Statement:. 21SQLite CREATE TABLE Statement: . 22SQLite CREATE TRIGGER Statement : . 22SQLite CREATE VIEW Statement : . 22TUTORIALS POINTSimply Easy Learning

SQLite CREATE VIRTUAL TABLE Statement: . 22SQLite COMMIT TRANSACTION Statement: . 22SQLite COUNT Clause: . 22SQLite DELETE Statement: . 22SQLite DETACH DATABASE Statement: . 23SQLite DISTINCT Clause:. 23SQLite DROP INDEX Statement : . 23SQLite DROP TABLE Statement: . 23SQLite DROP VIEW Statement : . 23SQLite DROP TRIGGER Statement : . 23SQLite EXISTS Clause: . 23SQLite EXPLAIN Statement : . 23SQLite GLOB Clause: . 23SQLite GROUP BY Clause: . 23SQLite HAVING Clause: . 24SQLite INSERT INTO Statement: . 24SQLite IN Clause: . 24SQLite Like Clause: . 24SQLite NOT IN Clause: . 24SQLite ORDER BY Clause: . 24SQLite PRAGMA Statement: . 24SQLite RELEASE SAVEPOINT Statement: . 25SQLite REINDEX Statement: . 25SQLite ROLLBACK Statement: . 25SQLite SAVEPOINT Statement: . 25SQLite SELECT Statement: . 25SQLite UPDATE Statement: . 25SQLite VACUUM Statement: . 25SQLite WHERE Clause: . 25SQLite Data Type . 26SQLite Storage Classes: . 26SQLite Affinity Type: . 26SQLite Affinity and Type Names: . 27Boolean Datatype: . 28Date and Time Datatype: . 28SQLite Create Database . 29Syntax: . 29Example: . 29The .dump Command. 30TUTORIALS POINTSimply Easy Learning

SQLite Attach Database. 31Syntax: . 31Example: . 31SQLite Detach Database . 32Syntax: . 32Example: . 32SQLite Create Table . 33Syntax: . 33Example: . 33SQLite Drop Table . 35Syntax: . 35Example: . 35SQLite Insert Query . 36Syntax: . 36Example: . 36Populate one table using another table: . 37SQLite Select Query . 38Syntax: . 38Example: . 38Setting output column width: . 39Schema Information: . 39SQLite Operators . 41SQLite Arithmetic Operators: . 41Example . 42SQLite Comparison Operators: . 42Example . 43SQLite Logical Operators: . 44Example . 44SQLite Bitwise Operators: . 46Example . 47SQLite Expressions . 49Syntax: . 49SQLite - Boolean Expressions: . 49SQLite - Numeric Expression: . 50SQLite - Date Expressions: . 50SQLite Where Clause . 51Syntax: . 51Example: . 51SQLite AND and OR Operator . 54TUTORIALS POINTSimply Easy Learning

The AND Operator: . 54Syntax: . 54Example: . 54The OR Operator: . 55Syntax: . 55Example: . 55SQLite Update Query . 56Syntax: . 56Example: . 56SQLite Delete Query . 58Syntax: .

this tutorial helps you to understand what is SQLite , how it differs from SQL, why it is needed and the way in which it handles the applications Database. SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is one of the fastest-growing database engines around, but that's growth in terms ofFile Size: 1MBPage Count: 172