have table with some values
role_number action_number status
4 2 1
4 5 0
4 8 1
4 7 0
4 10 1
4 3 0
Now want new role_number with same action_number and status , how to insert it ? for example it must be like :
role_number action_number status
4 2 1
4 5 0
4 8 1
4 7 0
4 10 1
4 3 0
5 2 1
5 5 0
5 8 1
5 7 0
5 10 1
5 3 0
INSERT INTO YourTable
(role_number, action_number, status)
SELECT role_number + 1, action_number, status
FROM YourTable
WHERE role_number = 4
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments