Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert into a Dynamic Table

Status
Not open for further replies.

TheStrangestGuy

Programmer
Jun 19, 2005
1
US
Hi,

I have not been able to find an answer to this important question, leading me to believe

that I'm missing something obvious.

I would like to create the table that holds a variable number of columns for each row.

I have created the table as ROW_TYPE=DYNAMIC, however I can't figure out how to insert new

rows correctly into this table. It seems to still only want the exact number of columns

that were defined during creation.

Thank you in advance.

- Alex
 
There's no such thing as dynamic rows in MySQL. Rows always use a fixed number of columns. However, when inserting rows, you can specify the fields you want to assign values to, and default values will be used for the rest.
 
The other solution is to create fields for data needed to distinct and select your rows (id, names, ...) and to store other variable data as pipe separated (for exemple) into a huge field.

Water is not bad as long as it remains outside human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top