Closed youngyin closed 3 months ago
alter table tb_customer add nickname_seq bigint;
update tb_customer A
set nickname_seq = (
select Z.seq from (
select rank() over (order by B.update_date) AS SEQ, customer_id
from tb_customer B
) Z
where A.customer_id = Z.customer_id
)
where 1=1;
select customer_id, nickname_seq, nickname, concat('일상0000000', nickname_seq) from tb_customer;
update tb_customer set nickname = concat('일상0000000', nickname_seq) where 1=1;
CUSTOMER 테이블에 nickname_seq 필드 추가.