MySQL question

Zelgaddiss

Veteran X
lets say i have a table

x 1 2 3
--------
1|a b c
2|d e f
3|g h i

and i want to make it

x 1 2 3
--------
1|a b c
2|a d c
3|a e c

how would i do that?
 
or rather, how to draw out a line... but sitting back and thinging about it theres a very easy way i can do this, but in like 3 parts and a loop, so nvm i think i can get it
 
:shrug: He asked for a way to do it in "mysql", which I presumed to mean pure SQL... and I don't think you can without subqueries.
 
what i'm thinging is:
-take a bit of data from the first coloumn i want (i.e 3rd coloumn and 3rd row or somthing)
-then take that and make a loop of the numbered row, so that it replaces it in every row.
-repeat till all is done..
think this weill work?
now i just gotta learn how to do it.. :p
 
Bohica said:
:shrug: He asked for a way to do it in "mysql", which I presumed to mean pure SQL... and I don't think you can without subqueries.


MySql is its own sql. Has the basic Sql premise with differences. Kinda like Posgres Sql
 
slick629 said:
MySql is its own sql. Has the basic Sql premise with differences. Kinda like Posgres Sql
what i meant was doing it using ONLY SQL statements. ie, without the aid of a programming/scripting language.
 
now if i wanted to insert JUST ONE value into a row, how is that possable without fucking up the rest of the row,
all the things i find only say how to insert a new row all together
 
Back
Top