I am new to SQL and I am making an asp.net page in which is a small airline service for a project for scool. For one of my tables I have:
AccountID, CustomerName, FrequentFlierMiles, FrequentFliernum for my column names. The acount AccountID column can not have duplicated values and FrequentFliernum can not have duplicated values and the only thing I could think from stopping that is through identity specification, the problem is you can only set one of the columns to have identity specification.
The AccountID and FrequentFliernum I would like to automatically increment by 1.
Right now my sql statement is
sql = "Insert Into Air_Customers VALUES(','" & txtname.Text & "','0','0')"
I would like that final '0' to automatically be incremented in the database and not have to manually put it in.
Anyhelp is appreciated. If this does not make sense I will try re-writing it.