I want to insert rows into a table that has a unique, non auto-incremented primary key.
Is there a native SQL function to evaluate the last key and increment it or d
create table if not exists Emp ( eid int(10) not null primary key auto_increment, name varchar(45) not null, age int(5) default 20, salary int(5) ) insert into emp values(102,'Ranjan',21,450000);
Then try below sql query . It will automaticaly increment the eid to next number .
insert into emp (name,salary) values( 'Lisma',118500);
select * from emp;