>if you use invoice id for key field you have to use invoice id for invoice lines and some other tables for reference. When you want to change invoice id you have to update all tables and this will a bit risky (programming mistakes, possible deadlock because of a long one transaction) and slow. but if you use identity column for this you just update your invoice no at just one table, use identity as reference with other tables.
The invoice master table has only one row for each invoice.
I've never seen an accounting system that would let someone change an invoice number but if there was one, an identity column would work.
Yes, invoice details rows need a way to identify themselves in addition to the invoice number, so an identity column in that table makes sense.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.