I am trying to learn SQL for a job interview on Tuesday. So I made a basic "People" table to get started. I then realized that you could auto increment columns. So now I need add the auto increment feature to my already existing table. I looked up how to do it but I keep getting an error message no matter how I try to do it. The table I made was like this...
create table People(
Person_id varchar2(3),
First_Name varchar2(30),
Last_Name varchar2(30),
Phone_Number number(10),
Email_Address varchar2(50),
Street_Address varchar2(50),
City_Name varchar(50),
State_Name varchar2(20),
Zip_Code number(10),
Occupation varchar(30),
Yearly_Pay number(20)
)
And I am trying to add the Auto_Increment functionality by saying something like...
ALTER TABLE `People`
CHANGE COLUMN `Person_id` `Person_id` varchar2(3) NOT NULL AUTO_INCREMENT PRIMARY KEY;
This is the error message I am getting.