using sql reserved names need to use a reserved sql name as a column name or table name need to include a hyphen in a column or table name no problem django quotes names appropriately behind the scenes so your database won t complain about reservedname usage
from django.db import models


class Thing(models.Model):
    when = models.CharField(max_length=1, primary_key=True)
    join = models.CharField(max_length=1)
    like = models.CharField(max_length=1)
    drop = models.CharField(max_length=1)
    alter = models.CharField(max_length=1)
    having = models.CharField(max_length=1)
    where = models.DateField(max_length=1)
    has_hyphen = models.CharField(max_length=1, db_column="has-hyphen")

    class Meta:
        db_table = "select"

    def __str__(self):
        return self.when