I need to know how to insert data in the row of a table in which one of the fields is a self-increment. The table, called 'employees', already has about 30 records and the 'employee code' is the auto-increment column, which goes by the number 30.
I have tried to introduce the following:
insert into empleados values(default, 'perico', 'palotes', 'de dios', 4587, '[email protected]', 'MADR-ES', 3, 'Representante ventas')
Specifying: the first column of the table, being a self-increment, I thought of putting a value "default" but it seems that it does not work, and put a constant '31', which is the next number that should appear I do not think it's the right thing to do.
EDIT: I can not put a null, the column is not null.
It has also occurred to me that it can work if I specify all the columns except this one and I enter their values, but I think it is not the best solution and there must be something else that can be done.
What should I put in the first value of the insert statement so that the auto-increment field is automatically filled in. Is there a keyword for the field to auto-fill?