def crossJoin(self): self.cursor.execute("SELECT * FROM Claim CROSS JOIN Member M;") writeTable(self.cursor.fetchall(), "cross join")
def rightInnerJoin(self): self.cursor.execute( "SELECT M.MemberID, C.ClaimAmt, M.FirstName, M.LastName FROM Claim C RIGHT OUTER JOIN Member M ON C.MemberID = M.MemberID;" ) writeTable(self.cursor.fetchall(), "right outer join")
def leftOuterJoin(self): self.cursor.execute( "SELECT C.ClaimAmt, M.FirstName, M.LastName FROM Claim C LEFT OUTER JOIN Member M ON C.MemberID = M.MemberID;" ) writeTable(self.cursor.fetchall(), "left outer join")
def innerJoin(self): self.cursor.execute( "SELECT C.ClaimAmt, M.FirstName, M.LastName FROM Claim C INNER JOIN Member M ON C.MemberID = M.MemberID;" ) writeTable(self.cursor.fetchall(), "inner join")
def getClaim(self): self.cursor.execute("SELECT * FROM Claim;") writeTable(self.cursor.fetchall(), "Claim table")
def getMembers(self): self.cursor.execute("SELECT * FROM Member;") writeTable(self.cursor.fetchall(), "Member table")