Add new column CUSTOMER_ID with prefix FCL in an existing table with existing data and Increment Start from FCL0001

Add New CARD_AUTO_ID



Check With select Statement


Add new coloum Customer_Id

Update This Customer_Id with this Statement


update CRM_Customer set Customer_Id='FCL'+ RIGHT( Cast((CARD_AUTO_ID+10000) as nvarchar(10)),4) 

Now Delete the CARD_AUTO_ID .
This Customer_Id is your auto Id




Comments

Popular posts from this blog

Easy Ui Jquery easyui-textbox change onChange event

Provision AWS EC2 Instance and RDS with Terraform, and Deploy Spring Boot App to EC2 Instance via GitHub Action Pipeline

npm install gets stuck at fetchMetadata