3
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 as key the ID column that is with an IDENTITY property
By what I researched, when inserting a new tuple in the table I can omit the ID field because it is auto-generated, however 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 someone please help me solve this problem?
Guys, I did as the friend guastallaigor helped me, but now that I made insertions another problem has arisen in the id field. Just going NULL to this field.
which bank ?
– Rovann Linhalis
ID is not auto-incremented
– Sveen