| | |
INSERT columns into rows
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2008
Posts: 9
Reputation:
Solved Threads: 0
hi,
i have a table called exam,
it has following columns
-----------------------------------------------------------------
| ID | QUESTION | OPTION_1 | OPTION_2 | OPTION_3 |
-----------------------------------------------------------------
now I've normalized it and put the exam options in another table called 'exam_option' table which keeps these options in rows instead of columns. Since i have a lots of data i want to put this information in my new table. Is there anyway to create such query whihc can do that.
i have a table called exam,
it has following columns
-----------------------------------------------------------------
| ID | QUESTION | OPTION_1 | OPTION_2 | OPTION_3 |
-----------------------------------------------------------------
now I've normalized it and put the exam options in another table called 'exam_option' table which keeps these options in rows instead of columns. Since i have a lots of data i want to put this information in my new table. Is there anyway to create such query whihc can do that.
•
•
Join Date: Apr 2008
Posts: 296
Reputation:
Solved Threads: 42
Hi
This is a very simple standard task you always have to solve, if one-to-many related tables need to get together. Is that not related to your other nice thread, E-commerce data design issue of May 12th, 2008, what is still dangling about?
krs,
tesu
This is a very simple standard task you always have to solve, if one-to-many related tables need to get together. Is that not related to your other nice thread, E-commerce data design issue of May 12th, 2008, what is still dangling about?
krs,
tesu
Information is moving—you know, nightly news is one way, of course, but it's also moving through the blogosphere and through the Internets. I promise you I will listen to what has been said here, even though I wasn't here. Ann and I will carry out this equivocal message to the world. I'm the master of low expectations.
•
•
Join Date: May 2008
Posts: 9
Reputation:
Solved Threads: 0
•
•
•
•
Hi
This is a very simple standard task you always have to solve, if one-to-many related tables need to get together. Is that not related to your other nice thread, E-commerce data design issue of May 12th, 2008, what is still dangling about?
krs,
tesu
Well i've retrieved and inserted my data through php script. Still any way though SQL will be appreciated.
Thank You!
Daniyal
•
•
Join Date: Apr 2008
Posts: 296
Reputation:
Solved Threads: 42
Hi daniyal
you may cast a glance on http://www.daniweb.com/forums/thread132147.html to get your inspiration from on how to solve your problem
krs,
tesu
you may cast a glance on http://www.daniweb.com/forums/thread132147.html to get your inspiration from on how to solve your problem
krs,
tesu
Last edited by tesuji; Jul 1st, 2008 at 9:46 pm.
Information is moving—you know, nightly news is one way, of course, but it's also moving through the blogosphere and through the Internets. I promise you I will listen to what has been said here, even though I wasn't here. Ann and I will carry out this equivocal message to the world. I'm the master of low expectations.
![]() |
Similar Threads
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- insert multiple rows in database (MS SQL)
- Add or Insert a "Content Table" using MS FrontPage (Site Layout and Usability)
- mysql tutorials (Database Design)
- Script stores data in wrong MySQL columns (MySQL)
- Tables (Java)
- passing mulitple parameters from jsp to a database (JSP)
- Sorting a selection (Visual Basic 4 / 5 / 6)
Other Threads in the MySQL Forum
- Previous Thread: query
- Next Thread: Phpauction - View feedback error
| Thread Tools | Search this Thread |
agplv3 alfresco amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns changingprices cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groklaw groupware hiring hyperic images innerjoins ip joebrockmeier join journalism keyword keywords kickfire laptop law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql syntax techsupport thunderbird transparency virtualization





