I have a database table with two columns
customer_id Number and first_name VARCHAR2
For customer_id, the number will be auto incremented.
I need first_name with the value of customer_id in a specific format.
See the below example:
If the customer_id is auto incremented to value 1, the first_name should be NAME-1 if the customer_id is auto incremented to value 2, the first_name should be with NAME-2
The only feasible option I got so far is performing 3 sql statements.
One for insert and the next one is to read the incremented value and perform update to the first_name column.
I greatly appreciate the help and guidance if anyone can suggest a better way of handling this in minimum possible sql queries.