sql query tags 1

sql query tags

These are the main sql query tags.
SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database
CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index

Here is what the above code is Doing:
1. We’re importing the sqlite3 module.
2. We’re creating a connection to the database.
3. We’re creating a cursor object.
4. We’re executing a query.
5. We’re fetching the results.
6. We’re looping through the results and printing them.
7. We’re closing the connection.

Similar Posts