Skip to content
Python SQL
Profile icon
xolyon

Can someone quickly explain SQL to me, how to use it and why or if its better than external files, thanks

IK its database but that's it, I need this for a project

You are viewing a single comment. View All
Answered by Codejira [earned 5 cycles]
View Answer
Profile icon
Codejira

The database file is created upon connection, if it doesn't already exist.
A simple SQL query in Python looks like this:

query = crs.execute("select name, address from personal_data").fetchall() for name, address in query: print(name, address)

Did this from memory, maybe not 100% correct


@xolyon