Q:

insert into, select and update queries at once

i have a table named exams with the column names and values
Id(PK)- ExamName - GradeId - TermId
155  - Maths - 22 - 15 
156 - English - 23 - 15

what i want to do is: to select the row with the id=155, update grade Id to 32 and term id to 25 and insert into the same table. since Id is a primary key, Id will change as well.
so the new inserted row will be:
157 - Maths - 32 - 25

Is there anyone who can assist me on this.
Thank you in advance.

A:

You can update the existing record via:
update exams set GradeId = 32, TermId=25 where Id=155

Or, you can insert a new record with those values like below, but updating would be more preferrable
insert into exams values (157,'Maths',32,25)

IF the primary key is auto-incrementing, then you can use:
insert into exams (ExamName,GradeId,TermId) values ('Maths',32,25)

Never update a primary key, it always creates problems!
EDIT:
To insert a record to a table from another table, please try:
INSERT INTO tablename (ExamName,GradeId,TermId) 
SELECT ExamName,GradeId=32,TermID=25 --don't know where the numbers are coming from, that's why adding manually here
FROM examps
WHERE Id = 155

