For my program I need to link two tables together which I know how to do. However, I only need to select certain fields and they are already stored in a python variable. How can I execute an sql search with only selects the fields from the row containing that variable value?
I am using SQLite and all I can do at the moment is something like
sql1 = '''SELECT *
FROM Dogs INNER JOIN Owners
ON Dogs.DogID = Owners.DogID
Order By Speed desc;
'''
I need to be able to use a variable