Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

have table with two columns with datatypes as number and
varchar and the values in
A column like 1,2,3 AND B column values like a,b,c.
now need to display data in a single column as 1,a,2,b,3,c.

Answer Posted / prativa mishra

select rtrim(xmlagg(xmlelement("c",A||' ,'||B||',')).extract('//test()'),',') single_column
from table_name

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data control language (dcl)?

1113


What is exit statement?

1000


Why select is used in sql?

1001


where are cookies actually stored on the hard disk? : Sql dba

1017


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

1109


What does partition by mean in sql?

947


What is the life of an sql statement?

1000


Is it mandatory for the primary key to be given a value when a new record is inserted?

1187


Write a sql query to get the third highest salary of an employee from employee_table?

1057


What is difference between hql and native sql?

1144


How long it takes to learn pl sql?

996


How do I sort a table in sql?

1020


how to analyze tables with 'mysqlcheck'? : Sql dba

995


Can a table contain multiple foreign key’s?

983


What is sqlcommand?

1009