0

I want to have a query that have a custom column and have some value of other column

here is example of a table

table 1 : id, name, emp_id 

I want to have input like this

id | name | emp_id | proccess    |
1  | John | 002    | Work of John|

The process is just costum column I want to do it in Select query..

This is what I tried:

Select id, name, emp_id, "Work of "+name as process, from table1

But its not working. I also want to add 2 or more column value in custom column.

Thanks

2
  • 2
    See JOIN and CONCAT().
    – Rick James
    Commented Jul 16, 2019 at 2:08
  • Suggest you either self-answer (and provide others with the solution and get some points), or delete the question.
    – Rick James
    Commented Jul 16, 2019 at 5:03

1 Answer 1

0

The answer Is Concat

You can use concat to combine an array and value of column

example query:

Select id, name, emp_id, concat("Work of ", name) as process, from table1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.