更新时间:2023-01-19 21:32:50
假设您想用 abc
替换第 30 到 50 行(按某些条件排序)的前 3 个字符,则:
Assuming you want to replace the first 3 characters with abc
for the 30th to 50th rows (ordered by some criteria) then:
SELECT CASE
WHEN ROWNUM BETWEEN 30 AND 50
THEN 'abc' || SUBSTR( your_column, 4 )
ELSE your_column
END AS replaced_value
FROM (
SELECT *
FROM your_table
ORDER BY <some_criteria>
)