发布网友 发布时间:2022-04-20 12:13
共4个回答
热心网友 时间:2022-04-09 16:43
如果字段A不是主键的话,写一个存储过程就行了.如下:
table---TEST
create or replace
PROCEDURE UP AS
CURSOR CUR IS SELECT A FROM TEST;
LI_T INTEGER;
BEGIN
OPEN CUR;
loop
FETCH CUR INTO LI_T;
exit when CUR%notfound;
UPDATE TEST SET A = LI_T -1
WHERE A = LI_T;
end loop;
close CUR;
END;
热心网友 时间:2022-04-09 18:01
update talble set a = a - 1 where a between 1 and 4;
热心网友 时间:2022-04-09 19:36
update table set a=case when a='1' then 'A' when a='2' then 'B' when a='3' then 'C' when a='4' then 'D';
不知道这是不是你要的结果?
热心网友 时间:2022-04-09 21:27
呵呵