I’m trying just to turn my column that I’ve already created into an auto_incremented column.
My table is Ator
which has CodAutor
and Nome
as columns. I see that instead of always put numbers (in this example, input 1) manually in CodAutor
, like:
insert into Autor (CodAutor, NAME)
values (1, 'NameExample')
it can be incremented automatically.
I’ve been trying this like:
ALTER TABLE Ator
MODIFY COLUMN CodAtor NOT NULL AUTO_INCREMENT;
but I get this:
2