0% found this document useful (0 votes)
4 views10 pages

12 A Sqlite

SQLite is a lightweight, serverless database that stores data in a single file and is commonly used in mobile apps and embedded systems. The document outlines the installation process, starting SQLite, and basic SQL commands for creating a database, table, and performing data operations such as inserting, viewing, updating, and deleting records. It also includes a command for permanently dropping a table.

Uploaded by

ShaaN
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views10 pages

12 A Sqlite

SQLite is a lightweight, serverless database that stores data in a single file and is commonly used in mobile apps and embedded systems. The document outlines the installation process, starting SQLite, and basic SQL commands for creating a database, table, and performing data operations such as inserting, viewing, updating, and deleting records. It also includes a command for permanently dropping a table.

Uploaded by

ShaaN
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQLite Overview

• SQLite is a lightweight, serverless database.


• It stores data in a single file.
• Widely used in mobile apps and embedded systems.
Installing SQLite
1. Go to [Link]
2. Download SQLite tools
3. Extract files
4. Add to system PATH
5. Verify using: sqlite3
Starting SQLite
Open command prompt
Type: sqlite3
SQLite shell will start
You can now run SQL commands
Creating a Database
Command:
sqlite3 [Link]
If file does not exist, it will be created automatically
Creating a Table
CREATE TABLE student(
id INTEGER PRIMARY KEY,
name TEXT,
marks INTEGER);
Inserting Data
INSERT INTO student(name, marks) VALUES('John', 85);

Add multiple records similarly


Viewing Data
SELECT * FROM student;
- Displays all records in the table
Updating Data
UPDATE student SET marks = 90 WHERE name = 'John';
Deleting Data
DELETE FROM student WHERE name = 'John';
Dropping Table
DROP TABLE student;
- Deletes the table permanently

You might also like