0
hi!
i find the solution of insert two column values into one column i.e., simple below is the code
create table users (firstname varchar(50), lastname varchar(50), username as lastname + ' ' + firstname)
insert into users values('Ajay','Kalidindi') // no need to write username column information it is automatically generated.
Thanks
0
hello ajay
i think we can not insert two coloumn value in to another column in single query. we can use update query after insert both values,this is very easy if your table has any identity column or any primary value like:
insert query: insert into table(name1,name2) values(" Ajay ", " Raju ")
update query: update table set name3=name1+name2 where id=(select max(id) from table)
thanks
Please mark as answere if it helps
0
Hi,
Why can't you take a variable and store firstname + lastname. Then pass firstname,lastname and this new variable to a stored Procedure