I have this table:
CREATE TABLE Persons
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
PRIMARY KEY (P_Id)
)
1. insert into persons values (1, 'John', 'Smith', 'LA', 'LA');
2. insert into persons (p_id, lastname, firstname, address, city) values (2, 'John', 'Smith', 'LV', 'LV');
How to insert data into a table without specifying a value for the primary key (the primary key does not have the auto_increment attribute).
I tried:
- insert in the values of the faces ("John", "Smith", "LA", "LA");
- insert into the values of faces (null, 'John', 'Smith', 'LA', 'LA');
- paste in the values of faces (auto, "John", "Smith", "LA", "LA");
but no luck
source
share