Link to home
Start Free TrialLog in
Avatar of Projack
Projack

asked on

Generate and retrieving Next sequential Customerid

There is a need for me to  list all customerid plus e next sequential CustomerId. in this table the customerid is not a primary key. I think a subquery should. How can i modify the below query to achieve this
select Distinct Customer_Id from customers
from (select MAX (Customer_Id) + 1 from customers where CUSTOMER_ID <> 999 )

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Projack
Projack

ASKER

Thanks for your advice. It is admin moduleand only one operator use that page per time