How to copy values from table for another column

GeoVIP

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
Vincent James
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.

edited at
0

Comments

0 comments
Login to comment

Related

copy values of two column of a table into a column from another table

How to copy the column id from another table?

Copy values from one column to another in the same table

How to insert values ​into a column from another table?

Copy table values to another table with + column

How to copy data from table to another table with the same column only

How to add column to a table with values of another column from a different table

How to copy paste values from another dataset conditional on a column

how to copy data into a table from another which have generated column

how to copy only distinct values from one table to another in Mysql?

How to create table from another table with passing NULL values to a column?

How to create table in Hive with specific column values from another table

mysql insert into select join - copy values from one column to another table, passing through a connecting table

SQL copy data from a column to another column from another table

Copy conditional values from one column to another

Copy values from one dataframe column to another

Android copy values from table and insert in another

SQL to copy values from one table to another

How to automatically load values from one table column to another in MYSQL

How to update specific column with values from another table

Excel formula - How to conditionally fill a column with values from another table

How to add data into the column with null values from another table?

How to create a column that has the count from one table of values in another?

SQL - copy data from one table column to another table column

Copy SEVERAL Column Values from One table into Another Matching IDs - SQLite

How do I "copy" enum values from one enum column to another enum column?

How to copy and paste a filtered table using VBA from one column to another visible column?

How to copy data from one table into another table which has a record repeated column in GCP Bigquery

How to add an array column to a table containing values from another column in the same table