1
我試圖創建PL/SQL腳本,用列大小更新我的表。 我的表看起來像這樣:LOOP更新列大小
| ID | TEXT | SIZE |
--------------------
| 1 | .... | null |
| 2 | .... | null |
| 3 | .... | null |
...
我想要的PL/SQL腳本,以填補大小取決於列文本的長度一定文件,然後刪除該文本列的內容。
這是我已經試過:
DECLARE
cursor s1 is select id from table where size is null;
BEGIN for d1 in s1 loop
update table set size = (select length(TEXT) from table where id = d1) where id=d1;
end loop;
END;
/
是的當然,不知道爲什麼我去了PL/SQL的方式:) – Marko 2012-04-13 08:05:38