oracle - How to get formatted SQL query result -


consider table

code name   city    salary --------------------------- 1   mark    la      12000 2   selena  ny       6000 3   justin  usa     50000 4   john    cn       3000 

i want result

john lives in `cn` , salary 3000. justin lives in `usa` , salary 50000. 

how can in oracle?

if there different method explain them .

to concatenate values in sql use ||. character values supplied using single quotes: '.

putting need use:

select name ||' lives in "'||city||'" , his/her salary '||salary the_table; 

Comments

Popular posts from this blog

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -