Database

Python for Databases

Key syntaxes Creating a table CREATE TABLE Users (name TEXT, age INTEGER, email TEXT) Inserting an instance INSERT INTO Users VALUES (‘Charles’, 20, ‘charles@abc.df’) Deleting an instance DELETE FROM Users WHERE email=’charles@abc.df’ Selecting an instance SELECT * FROM users WHERE email=’charles@abc.df’ ORDER BY name Updating an instance UPDATE Users SET name=’mike’ WHERE email = ‘charles@abc.df’ Advertisements