考慮幾種作法: 另外選 key , 傳票號給會計師用. 先產生暫存碼, 再用正式碼替換. 用一組傳票序號產生器, 避免重複.
MSSQL 語法如下, 關鍵指令: union all <pre class="c" name="code"...
PM.... 我會幫忙的...