I am using pymssql in my django project to connect to a database.
I'm trying to use execute() method to do an insert.
However I get this error:
Cannot insert the value NULL into column 'ID', table ITEMS
the ID column is primary key and so it should be filled by the sql itself as I understand. here is my insert command:
bill_id = execute("""
INSERT INTO ITEMS(COlUMN1,COlUMN2, COlUMN3,COlUMN4,COlUMN5)
VALUES (%d, %d, %d, %d, %d);
""", (1713, 6, 929, 1184, 25))
and none of these COLUMNs are ID. can anyone tell me what am doing wrong?