用時間微秒加隨機數,可能存在重複的情況,這個是postgresql的寫法
select trim(to_char(current_timestamp, 'yyyyMMDDHH24MISSUS')
||trim(to_char(floor(RANDOM()*999999999999),'999999999999'))) ids
用時間微秒加隨機數,可能存在重複的情況,這個是postgresql的寫法
select trim(to_char(current_timestamp, 'yyyyMMDDHH24MISSUS')
||trim(to_char(floor(RANDOM()*999999999999),'999999999999'))) ids