The point of this tutorial is to show you how to update multiple column into one column using the same table.
Step 1
First you have to make sure that the select statement is correct, try to use the below example to see if your statement display the correct value.
Example:
select columnA||columnB from TABLE A;
if you wish to include some kind of delimiter
select columnA||', '||columnB from TABLE A;
Step 2
Update TABLE A set column A = (select columnA||', '||columnB from TABLE A where A.index = B.index);
Step 3
Once you are sure about your value, please commit the action.
commit();
That is it! This conclude the tutorial on how to update multiple column into one column using the same table!
Step 1
First you have to make sure that the select statement is correct, try to use the below example to see if your statement display the correct value.
Example:
select columnA||columnB from TABLE A;
if you wish to include some kind of delimiter
select columnA||', '||columnB from TABLE A;
Step 2
Update TABLE A set column A = (select columnA||', '||columnB from TABLE A where A.index = B.index);
Step 3
Once you are sure about your value, please commit the action.
commit();
That is it! This conclude the tutorial on how to update multiple column into one column using the same table!
Comments
Post a Comment