AUTO_INCREMENT does not work in SoloLearn space
Hi all, I'm doing the SQL Intermediate course, and I'm having trouble with the AUTO_INCREMENT function. According to the course, this should be the code: CREATE TABLE PhoneNumbers( id int NOT NULL AUTO_INCREMENT, customer_id int, number varchar(55) ); This triggers the following error: ERROR: syntax error at or near "AUTO_INCREMENT" id int NOT NULL AUTO_INCREMENT, I've tried to find a solution, and the most common I find is that SoloLearn uses PostgreSQL and not MySQL, and that I should use serial als data type instead of int. CREATE TABLE PhoneNumbers( id serial NOT NULL AUTO_INCREMENT, customer_id int, number varchar(55) ); It leads to the same error ERROR: syntax error at or near "AUTO_INCREMENT" id serial NOT NULL AUTO_INCREMENT, Does anyone know how I can make AUTO_INCREMENT work? My next query would be this: (There are two values, because the id should get set automatically) INSERT INTO PhoneNumbers VALUES (1, '06123456789'), (1, '0368787965'), (2, '06987654321'), (3, '06123498765'); Thanks in advance!