I created the following table in sql
CREATE TABLE vendas
(
ID INTEGER IDENTITY(1,1),
Empresa VARCHAR (20),
Modelo TEXT,
Preco REAL,
Kilometragem REAL,
Ano INTEGER,
PRIMARY KEY(ID)
);
I put the ID column that has an IDENTITY property as the primary key
By what I researched, when inserting a new tuple into the table I can omit the ID field because it is self-generated, but I did the insertion.
INSERT INTO vendas VALUES ("Movidas","RENAULT SANDERO 1.6 EXPRESSION 8V FLEX 4P MANUAL", 36590.0,25.002,2017)
and returns the error
table vendas has 6 columns but 5 values were supplied: INSERT INTO vendas VALUES ("Movidas","RENAULT SANDERO 1.6 EXPRESSION 8V FLEX 4P MANUAL", 36590.0,25.002,2017)
Can anyone help me solve this problem, please?
Personal, I did as the friend guastallaigor helped me, but now that I did the insertions came another problem in the id field. It's just going to NULL for this field.