Lab SQL 16.11.2024
Lab SQL 16.11.2024
SQL
On your computer, create a new folder
Download SQLite3: https://www.sqlite.org/download.html
Run SQLite3
Double-clicking the sqlite3.exe icon will open a pop-up terminal window with
sqlite running. This will create a temporary, untitled database db1.db that will
be deleted when you exit the session
SQL Operators
.save path
.open path
.tables list of tables
.schema table_name Retrieve a list of columns in the tables
The CRUD Operations
CRUD (Create, Read, Update and Delete).
• Create = INSERT
• Read = SELECT
• Update = UPDATE
• Delete = DELETE
Sample:
a) Create table Personnel
Id PName PSname PAge
CREATE TABLE Personnel (Id Integer Primary Key, PName varchar(30), PSname
varchar(30) ,Age integer);
b) Insert data into the table
Task:
2.Run SQLite
All data,
Only data for students with the name JOHN
Names of students with the age > 23
Names and Snames of students with the age < 25
https://www.programiz.com/sql/online-compiler/