I have customer table with column First_Name and Last_Name of Customer, I want to combine these two column with one Customername and add this Customer_Name column in the table also .and want to remove first_name and Last_name column from the table .
select First_name, Last_name, concat(First_name,' ',Last_name) as Customer_Name from Customer;
alter table Customer add CustomerName varchar(50);
insert into Customer (CustomerName) values (First_name + ' ' + Last_name);
select * from Customer;
alter table Customer add CustomerName1 varchar(50);
insert into Customer (CustomerName1) values (convert(varchar(50),First_name + ' ' + Last_name);
these are the command which i already tried but error
Here how to do it :
Add CustomerName column :
Then, rather than inserting, you must update:
Then drop columns :