[Actually I have a million records but I have taken an example in picture.
Initial table contains 3 records but the result I need is same 3 rows + same number of rows (same data) but with negative values....So resulted table has 6 records in pic
The question is initially I have million of records with positive values
But the resulted table I need is both previous data and insert same copy of data with negative values… If I have 100 records...The resulted table contains 200 records (100 positive and 100 negative records)
]1
use INSERT INTO .. SELECT as follows:
INSERT INTO .. SELECT
insert into your_Table select a, -B, -c from your_table
2.1m questions
2.1m answers
60 comments
57.0k users