I am selling some products, namely A to M. I record the orders of costumers in a table, named "orders". Can we assign a unique number, named invoicenumber here, for each set of orders that a costumer puts? Please see this table:
Actually I’d like to know how I can design the invoicenumber field so that they are set automatically, increase sequentially, and unique for a set of orders like the above example.
Thank you
Code:
ID costumer product quantity unitprice orderdate invoicenumber
12 jack A 4 10 25/11/2014 8612
13 jack B 5 5 25/11/2014 8612
14 jack C 1 4 25/11/2014 8612
15 jack F 3 2 25/11/2014 8612
16 Steve G 4 8 25/11/2014 8613
17 Steve H 1 7 25/11/2014 8613
17 John C 1 5 28/11/2014 8614
17 John D 3 6 28/11/2014 8614
17 John G 1 8 29/11/2014 8615
17 John L 1 3 29/11/2014 8615
17 Jack C 2 5 29/11/2014 8616
Thank you