私はテーブルを持っています。
**Fruit Number**
Apple 5
Grape 9
Orange 1
Coconut 54
Mango 22
したい :
- リスト全体を選択
- 「アップル、マンゴー、ココナッツ」をリストの一番上に置きます。
- number = rownum の現在の順序を更新します。
リストは次のようになります。
**Fruit Number**
Apple 1
Mango 2
Coconut 3
Grape 4
Orange 5
次のことを試しましたが、構文の問題が発生しました..
update tablename
set id = rownum
where fruit in (select fruit from table order by decode(fruit,'Apple',1,'Mango',2,'Coconut',3))