How to write query in Flask using placeholders to join tables

Solution
EX = db.execute("SELECT * FROM ? INNER JOIN body ON ?.joint_id=body.joint_key;", (joint, joint))