with t as (select id, birthday, identification, substring(identification, 7, 8), concat_ws('-', substring(substring(identification, 7, 8), 1, 4), substring(substring(identification, 7, 8), 5, 2), substring(substring(identification, 7, 8), 7, 2) ) as a from app_public.users where identification is not null and identification != '' ) UPDATE app_public.users t1 SET birthday = t.a FROM t WHERE t1.id = t.id;
文章来源:https://uudwc.com/A/rZ63D
-- select * -- from t;文章来源地址https://uudwc.com/A/rZ63D