- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquery.py
More file actions
Latest commit
29 lines (16 loc) · 369 Bytes
/
Copy pathquery.py
File metadata and controls
29 lines (16 loc) · 369 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Clearing the screen
importos
os.system('clear')
# Importing sqlite3 module
importsqlite3
# Establishing a connection and create DB
conn=sqlite3.connect('customer.db')
# Creating a cursor
c=conn.cursor()
# Querying
c.execute("SELECT * FROM customers")
print(c.fetchall())
# Commiting changes made
conn.commit()
# Closing our connection
conn.close()