Thanks to this good forum, got a number of solutions to my past queries, thanks to Google too. This is my first post in the forum although.
I have a table order with columns pin, orderPath, quantity. There are 5000 data in the table already. Now, I want to add an identy column, say OrderID, but with order by column pin.
Using the following query helps but not in the order as required.
ALTER TABLE order
ADD OrderID numeric(6,0) identity
Here's what I would like to see:
Pin--OrderPath--Quantity--OrderID
11 xyz/pop 200 1
22 kl/pod 100 2
33 djh/dd 200 3
44 dj/po 300 4