Here i have situation in my mysql table,i want get the particular row value and the same value i want to insert into another row in the same table.
Here the example
qualification Name Age id(pk)
BE ragu 22 1
BE ravi 33 2
I want To insert 2nd row again,the result must b like the following:
qualification Name Age id(pk)
BE ragu 22 1
BE ravi 33 2
BE ravi 33 3
Suggest me some idea.... thanks in advance...
Use INSERT ... SELECT
syntax for that
INSERT INTO Table1 (qualification, Name, Age, id)
SELECT qualification, Name, Age, 3
FROM Table1
WHERE id = 2
Here is SQLFiddle demo