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...

Hello Frndz,
I have a table named product as shown below:
product_id product_name
1 AAA
1 BBB
1 CCC
2 PPP
2 QQQ
2 RRR

Now my output should be:
product_id product_name_1 product_name_2 product_name_3
1 AAA BBB CCC
2 PPP QQQ RRR

Answer Posted / vaishnavi a

Thanks for ur response, i just gave a sample table with few
records, but in a real time scenario we have a table with
duplicates & there can be many products under a particular
prod_id.It is not that there should be only 3 products
under a prod_id , it could be even 50. wat could be an
optimised way of writing a query for this scenario??

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is database exceptions in teradata?

957


What is the difference between fastload and multiload? Which one is faster?

1231


What do high confidence, low confidence and no confidence mean in explain plan?

1048


Explain the term 'primary key' related to relational database management system?

1038


What are the string manipulation operators and functions associated with teradata?

1098


What is the purpose of joins in teradata?

1192


What are default access rights in teradata? What explicit right can be given to a user?

1113


What exactly do you know about catching in teradata?

1039


What are the design features involved in teradata?

1063


What is basic teradata query language?

1118


Explain parsing engine in teradata?

1098


what are the day to day activities of teradata DBA ?

5828


What happens when a node suffers a downfall?

1139


tomorrow i have interview in infosys.can someone pour any suggestions or any interview questions. thank you

837


Differentiate primary key and partition key?

986