SQL生成序列号

select id,'Q'||to_char(sysdate,'yymmdd')||substr('00000',0,5-length(id))||id from sys_admin t order by id;

编程技巧