code: def parse_create_table(sql):
      
      column_types = {}
      for line in sql.splitlines()[1:]:  # first line = CREATE TABLE
          sline = line.strip()
  
          if not sline.startswith('`'):
              # We've finished parsing the columns
              break
  
          bits = sline.split('`')
          assert len(bits) == 3
          column_name = bits[1]
          column_spec = bits[2].lstrip().rstrip(',')
  
          column_types[column_name] = column_spec
      return column_types
docs: Split output of SHOW CREATE TABLE into {column: column_spec}