| | |
INSERT columns into rows
![]() |
•
•
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 8: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
Views: 1790 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for MySQL
"use" .db 1 ajax alphabet amazon aws camparingtocolumns cascade cast code convert count count(col) data database delete design distinct ec2 eliminate enter error form generator html images innerjoins insert join keyword keywords matchingcolumns multiple multipletables mysql mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch noob number open operand oracle order parse pdf php print query recursive relationaldatabases relationship relationships remove reorderingcolumns resultset retrieve script search select simpledb sort sql statement string syntax table tree type-conversion update values welsh





