I am using Oracle DB Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
I have the following create table script. I want to update multiple rows within the same table with same values
For e.g.
CREATE TABLE dummy_test_table(seq_no) AS
SELECT '0000000957' FROM dual UNION ALL
SELECT '0000000957' FROM dual UNION ALL
SELECT '0000000958' FROM dual UNION ALL
SELECT '0000000958' FROM dual UNION ALL
SELECT '0000000969' FROM dual UNION ALL
SELECT '0000000969' FROM dual UNION ALL
SELECT '0000000957' FROM dual UNION ALL
SELECT '0000000958' FROM dual UNION ALL
SELECT '0000000959' FROM dual;
I want to update the table and set the batch id with same seq no with similar batch_id either through sql or plsql and get the o/p as below. Could someone pls help arrive at the query.
Seq_no | Batch_Id |
---|---|
0000000957 | 001 |
0000000957 | 001 |
0000000957 | 001 |
0000000958 | 002 |
0000000958 | 002 |
0000000958 | 002 |
0000000969 | 003 |
0000000969 | 003 |
0000000970 | 004 |
Thanks